Commenting out unused functions. Made the write to event log function work by registering the app command line for writing to log.