Fix some bugs; Make grammar snippet use filename