Add specs and more tests for mad_compile