cleaning up a bit to prepare for jquery addition