Revamp build process

Change-Id: Ic685b3fc658d0489d16952ee0760fa6363fd58ef