Refactor constructor and apply