Refactor

Some cleanup and renaming