Removed old cruft, refactored for betterish names