Add support for custom types

Moved regular expressions, buffers, dates and functions to custom types.
Refactoring findFirst pattern into function
Merge pull request #32 from sunesimonsen/customTypes

Adding support for custom types