improved the commenting around various functions