Refactoring app to fix some bugs that we're persistant