Refactorization regarding conventions of ble-ti-sensortag JS code. Impro...

...ved comments, added error redirection.