Bug fixes and various cleanups.

Added failing tests to show how multiple-inheritance is just broken.