Slightly clean up some code