Moved the cast command into its own module.