pattern matching optimizations
label tracking shenanigans
added more macros and fixed pattern bugs