Made macros and added cell checking code