Add support for subID and locationID. This is mostly backward compatible, but will change the database schemas.