Refactors code to use one initialize method