Better errors

Just a little cleanup of the macro code