Added state parameters to device, GUI stuff working on a basic level