- factor out apm_package_url
- use lassign instead of 3 cmds
- what space change to follow coding guidelines
- white space change to follow coding conventions