Added fixes suggested by jlee-r7

additional code clean up