Move some database logic out of views
Deleted unused view
Revert "Deleted unused view"

This reverts commit d20cbcb88e18e495ca53cdc2be69bf4dd33145a3.

Wrong file
Remove unused file properly
Complete library features including checkout and return. Improved admin features to come