Merging from johnmorrow/pk