Restructure program (use CMyArray instead of CLIst)