code formatting

being more consistent with tabs vs. spaces.
universal function for changing innerHTML

should make code more succint and readable