Bug with variable names fixed, touch up on comments