Addded BibTex functionality and cleaned up things