Add const, clean code