Refactor to simplify
Log added