fixed multifile problems
implemented generic security stuff