Code refactoring on tracks by @johannessjoberg