PMS

Latest PMS changes, mostly just formatting

@SharkHunter and @valib anything you object to here or should we merge?