Cleanup

Removed obsolete code, renamed for clarity.