Merging changes from DomenicP's version.

Saw that you made some updates, just merging them in.