Replaced postfix ++ with prefix where possible.