PM refactoring

cleaned the PM controller from a bunch of queries.. some are still remaining..