Factor out a data Api, add more lamp controls