Revert "Small fixes"

This reverts commit 8086292b1bd844b3a9f3377c7f0fc2521c9e197f.

The commit included too many changes.