more progress on fixing various bugs in track/untrack

there was also some problems with the DB schema in terms of indexing, which has since been fixed