Fixed a few signed/unsigned comparisson errors and fixed up whitespace.