added suggested refactors + comments