Added Functionality to main.cpp

added several utilites to things in common
created a threads file to deal with the thread function (didnt like them
at the bottom of main.cpp)
options menu stuff