One minor bug fix and removed some ununsed commented code.