Added unit tests + documentation + bug

Fixed a bug where the startup_harness was not being called correctly. Added unit tests too.