Changed 'locked' to 'tuningLocked' and fixed code, general cleanup
EB - Updated Rev Code