initial IE8 support; fix code formatting