Removed function usage(dead code) and removed global declaration(not needed)