refactored classes + cleaned up code and UI stuff