fixed #105 and #265 + bug fix with opening bibliography
made $.append(), $.appendTo(), $.html() calls more secure