Added tmpstr variable and removed some out-commented code.