Small code cleanup and moving files from app to lib

Mostly to fix a dependency issue I was getting when trying to test openstax_api.
Ah just wanted to be consistent, since this is the only place in the utilities code where we used the abbreviation (I left it in the specs, though).