Fix regressions in track factory
Setup guard rspec
Fix minor bugs in permission checking for track