Updated extra credit. Added some Javadoc comments