Code cleanup and documentation

openscholar/openscholar#3265