Made changes after code review with Rob Pachos