Refactored Spotimote, working