mcl: added stubs and some pseudocode, designed better structure