Added tests for startup and shutdown (which currently fail) fixed all other compile errors and running errors