Instrument code cleanup
Better tests