remove duplicate branches
use pre-increment operators for non-primitives

Pre-increment/decrement can be more efficient than post-increment/decrement for non-primitives.
Merge pull request #179 from mscdex/code-improvements

Code improvements