added proxy to make serverside connection possible, and made the main.java file a LOT neater