Create CMachine

This is final completed source code