Refactor shapes creation.