Core pr 4

Updated coding style and documentation.
Merge with PH libraries.