Fixed TickEvents not being created. Also moved some code around.