Revert "Code improvements"

This reverts commit d7e3e272a458d35668c95ae2844e752c3ccbd2c0.