Bibliography support completed (with zotero plugin). Also fixed some bugs.