split API into Controller and Devices (just an attempt)