Added some javadoc and made it use the simple data in a better way for
smoother code