Converted to proper class
added threading and menu