2D shape refactor