Cleaned up names and refactored