Cleanup (comments mostly and some internal refactoring)