Code Cleanup, Reformating and Javadoc Fixes

This is a PR dedicated to cleaning up redundant code and simplifying things where possible in the code. I hope that this can improve numerous things in Groovy, including performance :)

A lot of this includes generifying things and removing redundant casts.