Manually merged pull request from Freek: Main.java