Added Tick class, performed some restructuring.