Edits to remove commented code and added further documentation.