Some potentially dangerous, but useful things

Things for setting and unsetting attributes. Centralized to not write javascript in the code.