Corrected code to compile and pass test cases;
The metaprograms generate skeletons automatically, but stubs need to be done by hand.