Fix a number of bugs and get basic processing running (although there's an error saving).