Improved deriving of instances
Even less instance cruft
Added case checking for funcs/types