Added more comments. Removed unecessary methods.