Merge in Scratch 2 changes from cleaned up branch

This is a clone of #79, but unfortunately I couldn't save the commit history.