Rewrote front end, modified endpoint to return light states