Moved STAThread attribute to entry point + added ability for CLI to return exit code