Changed most of variable names to hungarian notation.