Refactor init methods to avoir code duplication