reworked code

slightly cleaner code, now detects ARM Linux (should work with
Raspberry Pi Debian, hard-float only).