Fix test to use new build command:
Refactor some arch code, and use it for deploy