Updated some code and some documentation