Refactored, Cleaned up