Refinements to script.. extract stuff out into config files