UI Improvements, refactored JS