Added papers and some code cleanup