Fixed some issues with the UI
Added more comments