removing un-necessary global declarations
better documentation