First Commit: Pushing all the code. Ported to 1.7.10