Started major refactoring of trackapp