Added documentation
Vectorized a few expressions