stopped tracking database, cleaned up code