Move the TCX Track code to a separate function

This will make it easier to add TCX laps, and assist with general code
maintainability.
Use the logged-in user for TCX's Builder element