Cleanup
Add junit tests