Fix Compiler Warnings

The project contains several compiler warnings related to generics that
can be fixed easily.