Revorked the entire code to eliminate Jframe