Core pr 4

Merge with PH libraries.
Fixed a lot of theme related stuff.