fixed local functions to static, added GPIO initializer, added security functions