Renamed Element's rectangle to bounds. Added some assertions.