Fixed the double window issue
Revived old "main(String[])" function to former glory