Removed some dead code, minor renaming