App no longer stops on pause. Also small refactors