Simplified the variable names a bit. Also a little random cleanup.