Corrected distance calculation.
Removed alarm code.