Merge with Tom's Level Code

Trying to merge your code into the baseline. I'll take a look when I get a chance.