added security and other changes