Cleanup - Remove unused/commented out code
Improve and extend unit tests