Code refactoring on the Hexagon class.