Reorganising security lib into its own folder