Completed basic Generics support.

Added a couple test cases.