Better way to set enabled elements