Updating code and documentation