Thin the code out a little