Cleaned up, refactored and added ui.sortable