Refactored to have both test and build image in here...