[Andrei] cleanup
[Andrei] various small fixes