Adding excerpt to reference synthesis and fixing some bugs