Added useful comments, javadoc. Made window resizable.