Refactored ampachedb code out of tracklist project for independent use -
still contains some redundant code as it needs to be under source
control before deleting