Refactorization regarding conventions of ble-ti-sensortag JS code. Improved comments, added error redirection.