Fixed some generics warnings, improved JavaDoc and logging