Added error handling and guardbanding for probe measurements, added and updated comments, improved program flow and removed unused variables. Rev'd to 1.5.