Minor changes
Removed unrequired variable lineIndex 
Changes some variable names