DOM reading, manipulation, and writing simplified into 3 static functions.