Solved some lingering issues and finished the refresh functionality