Added miscellaneous comments and removed unused code