refactors pmods, fixes access qualifiers