Randomm dead code cleanup/spelling errors/made a variable static.