Modified download, added javadocs