Refactoring

Refactored for organizational reasons.