Refactor mesh constructors with common init function