Changed all post-increment operations to pre-increment.