Split sources into type definitions and method definitions for Autoreload.

Modify the test so that it runs.