Moved external code to ext, renamed CVTControl, and separated definitions into a header file.