Added simple error-checking macros, made compiler stricter about conversions