Cleanup
Most code in Tick is now split up in different functions.