Implemented some basic functions for CFA. Use flag 'cfa'.