Minor code clean up

Just a few quick fixes to be more efficient.