Fix to use architecture instead of hardwareisa and add tests.

~jms