Correct version and clean code