Fix compiler warnings and template haskell errors

Lower versions of template haskell are apperantly very picky.