Code cleanup.

Unified naming convention, added more whitespace for readability,
removed unused resources and code.