bug 1028718 - some cleanup, half done