[Refactor] Transform some class to struct, adding final keyword in front of some class. Add check in destructors.
Remove unecessary intermediate variable in randomBool function