script refactoring
cleanup base image