Clean up code, finish testing and coverage