Cleaning up bugs, fixing simple_example.