Cleaned up and refactored heavily