Cleanup

Some improvements for code readability.