Final version made with comments and updated the sensor library.