image size cut in half to 500MB through reorganization of compilation and compilation options