Reverted some late changes due to the comments made by @stof