various code cleanup
Adding more logging plus ubidots