Some code organization/renaming