Refactored the code to reflect intent, and improved database
Database now updated based on shown attributes
Added datepicker for button-works with no date selected as well