Fixed the startup and shutdown events and added some log lines so that unimplemented methods will not be missed
Fixed command line arguments an initialize