Cleaned up Main.java, and fixed a bug with properties