Feat getvotes refactored with app base class

This is a combination of the app-refactor and feat-getvotes branches for which I just sent pull requests. If you want to merge them both, you can simply merge this branch instead.