Changed the definitions of light and switch