A few minor tweaks to work from import rather than command line