pattern matching

a lot of code but it doesn't perform half as well as those posted :(
currently clears about 2-8 rows. Haven't incorporated the heuristics
from the main branch - but just to show you guys what i've been doing -
will submit another commit later in the week, with some reworks