Fixed some things in main class.