Space out some code for better readability
Remove window.location.reload operations
Refactor drawing the items table
Add descriptive comments
Move button handlers to a central event handler