IE7 fix and small tidy up