Prettified and added javadoc