cleaned up some code
cleaned more code, added settings button