Api & Orig Code Impl.

Implemented the original MiscPeripherals code and various apis.
Rewriting to 1.7.x isn't complete jet....