Merge "Partial fix for bug 8. Fixing many generics-related warnings and some typos."