Implement new magic frontend using sexpr