Log plugin - Code clean-up and $frm enhancements