Moved some stuff out of constructor

Also added tracker.