Reorganize security and search modules to align with the rest of the lib