Simplifying the Programming of Intelligent Environments