4th Revision, Added full comments, and full functionality