Added static modifier to several functions