refactored into goodness

by that i mean namespaces :)
added missing di

for checkout books and checking out a book