Refactoring deploystack around load_image

Also removes unwanted "magic" element detection from deploystack.