Revert "various imrovements"

This reverts commit 0dabeb2e508c81d7bc017cb9d7b628fafd020b91.