Made all local functions static

Change-Id: I42d4e3179f5b5425a95e16a83ea2bb971b16199c