Fourth mode implemented : log. Plus some minor commenting done/fixed.