Renaming and moving some methods, for better code organization.