Cleaned up a couple choppy bits of code