Added support for logging and other minor updates.