Moved most of firmata related code to its own class