Code cleanup (reverted from commit 002665f439e344c787cf4dffceae6eff06cef280)