fence: moved fence into its own module