More JavaDoc comments. Fixed some problems with Generics. Added some Exceptions