Adding logging and simplified arguments.