Tests and more tests

    Switched to Mocha
    Fixed missing documentation
Support for custom regex matching background