Tests and more tests

    Switched to Mocha
    Fixed missing documentation