Cleanup, more popup functions and removed old settings functionality