Implemented shallow nesting, but there are still some bugs to be fixed