Prettified the code
Added documentation to log_ctx