clean up, add option to exit the app and fixed FC