Added test script and a few basic tests.
Added exportable functions for load test and server.