Update code to reflect @hdmoore code suggestions
Update code to reflect @jlee-r7's code review