General Update of code and commenting