Refactored initialization phase. Closes #182