rewritten matcher to use lists instead of slices
added split, clean and match routines, tests for them