Functions used in Appcelerator