More renaming and bug fixes