Additional fixes and some clean ups