Added a lot of javadoc comments.

Functionality finished for iteration 1 of Netpaint