refactored juju related module to respect ps guidelines