Bunch of changes

...uestions and solutions, tests for getting favorites, and a database stub as part of the integration tests. Added support for getting favorites. Refactored code, conformed to style. Fixed several other bugs.