Removing unused errors messages
Fixing variable shadowing issue