Moved over main rev function to branch and did simple cleaning
Moved over main rev function to branch and did simple cleaning

stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math,stan-dev/math