Cleaned up arm controller code, now rejects NaN