diff --git a/uefi-macros/tests/ui/fail/entry_bad_arg.stderr b/uefi-macros/tests/ui/fail/entry_bad_arg.stderr
index 2f8f96ad3..9d292cf66 100644
--- a/uefi-macros/tests/ui/fail/entry_bad_arg.stderr
+++ b/uefi-macros/tests/ui/fail/entry_bad_arg.stderr
@@ -4,5 +4,5 @@ error[E0308]: mismatched types
 8 | fn main(_handle: Handle, _st: SystemTable<Boot>, _x: usize) -> Status {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect number of function parameters
   |
-  = note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> uefi::Status`
-             found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>, usize) -> uefi::Status`
+  = note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> uefi::Status`
+             found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>, usize) -> uefi::Status`
diff --git a/uefi-macros/tests/ui/fail/entry_bad_return_type.stderr b/uefi-macros/tests/ui/fail/entry_bad_return_type.stderr
index 4c7d1674e..6e718c631 100644
--- a/uefi-macros/tests/ui/fail/entry_bad_return_type.stderr
+++ b/uefi-macros/tests/ui/fail/entry_bad_return_type.stderr
@@ -4,5 +4,5 @@ error[E0308]: mismatched types
 8 | fn main(_handle: Handle, _st: SystemTable<Boot>) -> bool {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Status`, found `bool`
   |
-  = note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> Status`
-             found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::table::SystemTable<uefi::table::Boot>) -> bool`
+  = note: expected fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> Status`
+             found fn pointer `extern "efiapi" fn(uefi::Handle, uefi::prelude::SystemTable<uefi::prelude::Boot>) -> bool`
diff --git a/uefi/src/lib.rs b/uefi/src/lib.rs
index 52ff54cbb..378be3b8d 100644
--- a/uefi/src/lib.rs
+++ b/uefi/src/lib.rs
@@ -95,50 +95,38 @@
 
 #[cfg(feature = "alloc")]
 extern crate alloc;
-
 // allow referring to self as ::uefi for macros to work universally (from this crate and from others)
 // see https://github.com/rust-lang/rust/issues/54647
 extern crate self as uefi;
-
-/// Re-export ucs2_cstr so that it can be used in the implementation of the
-/// cstr16 macro. It is hidden since it's not intended to be used directly.
-#[doc(hidden)]
-pub use ucs2::ucs2_cstr;
-
 #[macro_use]
 extern crate uefi_raw;
 
 #[macro_use]
 pub mod data_types;
+pub mod allocator;
 #[cfg(feature = "alloc")]
-pub use data_types::CString16;
-pub use data_types::{CStr16, CStr8, Char16, Char8, Event, Guid, Handle, Identify};
-pub use uefi_macros::entry;
-pub use uguid::guid;
-
-mod result;
-pub use result::{Error, Result, ResultExt, Status, StatusExt};
-
+pub mod fs;
+pub mod helpers;
+pub mod mem;
+pub mod prelude;
+pub mod proto;
 pub mod runtime;
 pub mod system;
 pub mod table;
 
-pub mod proto;
-
-pub mod prelude;
-
-pub mod allocator;
-
-#[cfg(feature = "alloc")]
-pub mod fs;
-
-// As long as this is behind "alloc", we can simplify cfg-feature attributes in this module.
-#[cfg(feature = "alloc")]
-pub(crate) mod mem;
-
 pub(crate) mod polyfill;
 
-pub mod helpers;
-
 mod macros;
+mod result;
 mod util;
+
+#[cfg(feature = "alloc")]
+pub use data_types::CString16;
+pub use data_types::{CStr16, CStr8, Char16, Char8, Event, Guid, Handle, Identify};
+pub use result::{Error, Result, ResultExt, Status, StatusExt};
+/// Re-export ucs2_cstr so that it can be used in the implementation of the
+/// cstr16 macro. It is hidden since it's not intended to be used directly.
+#[doc(hidden)]
+pub use ucs2::ucs2_cstr;
+pub use uefi_macros::entry;
+pub use uguid::guid;
diff --git a/uefi/src/mem/mod.rs b/uefi/src/mem/mod.rs
new file mode 100644
index 000000000..81daaa50b
--- /dev/null
+++ b/uefi/src/mem/mod.rs
@@ -0,0 +1,8 @@
+//! Types, functions, traits, and other helpers to work with memory in UEFI
+//! libraries and applications.
+
+#[cfg(feature = "alloc")]
+pub(crate) mod util;
+
+#[cfg(feature = "alloc")]
+pub(crate) use util::*;
diff --git a/uefi/src/mem.rs b/uefi/src/mem/util.rs
similarity index 100%
rename from uefi/src/mem.rs
rename to uefi/src/mem/util.rs