From 8954dc405f8517b4068bd1584762a403c781441a Mon Sep 17 00:00:00 2001
From: jakcron <jkrcarr@gmail.com>
Date: Tue, 7 Aug 2018 15:17:51 +0800
Subject: [PATCH] Fixed links.

---
 lib/libcompress/source/lz4_wrapper.cpp        |   2 +-
 lib/libes/include/nn/es/SectionHeader_V2.h    |   6 +-
 lib/libes/include/nn/es/TicketBody_V2.h       |   7 +-
 lib/libes/include/nn/es/ticket.h              |   3 +
 lib/libes/source/SectionHeader_V2.cpp         |  42 ++--
 lib/libes/source/TicketBody_V2.cpp            |  86 ++++----
 lib/libhac-hb/include/nn/hac/AssetHeader.h    |   8 +-
 lib/libhac-hb/include/nn/hac/aset.h           |   9 +-
 lib/libhac-hb/include/nn/hac/nro-hb.h         |   9 +-
 lib/libhac-hb/makefile                        |   2 +-
 lib/libhac-hb/source/AssetHeader.cpp          |  36 ++--
 .../include/nn/hac/AccessControlInfoBinary.h  |  25 +--
 .../nn/hac/AccessControlInfoDescBinary.h      |  25 +--
 lib/libhac/include/nn/hac/AesKeygen.h         |   5 +-
 .../nn/hac/ApplicationControlPropertyBinary.h |   9 +-
 .../nn/hac/ApplicationControlPropertyUtils.h  |   7 +-
 lib/libhac/include/nn/hac/ContentMetaBinary.h |  26 +--
 .../nn/hac/FileSystemAccessControlBinary.h    |  10 +-
 .../include/nn/hac/HandleTableSizeEntry.h     |   7 +-
 .../include/nn/hac/HandleTableSizeHandler.h   |  10 +-
 .../nn/hac/HierarchicalIntegrityHeader.h      |   8 +-
 .../include/nn/hac/HierarchicalSha256Header.h |   8 +-
 .../include/nn/hac/IKernelCapabilityHandler.h |   8 +-
 lib/libhac/include/nn/hac/InteruptEntry.h     |   8 +-
 lib/libhac/include/nn/hac/InteruptHandler.h   |  10 +-
 .../include/nn/hac/KernelCapabilityBinary.h   |  22 ++-
 .../include/nn/hac/KernelCapabilityEntry.h    |   8 +-
 .../include/nn/hac/KernelVersionEntry.h       |   8 +-
 .../include/nn/hac/KernelVersionHandler.h     |  10 +-
 .../include/nn/hac/MemoryMappingHandler.h     |   8 +-
 lib/libhac/include/nn/hac/MemoryPageEntry.h   |   8 +-
 lib/libhac/include/nn/hac/MiscFlagsEntry.h    |   8 +-
 lib/libhac/include/nn/hac/MiscFlagsHandler.h  |  10 +-
 lib/libhac/include/nn/hac/MiscParamsEntry.h   |   9 +-
 lib/libhac/include/nn/hac/MiscParamsHandler.h |  10 +-
 lib/libhac/include/nn/hac/NcaHeader.h         |   8 +-
 lib/libhac/include/nn/hac/NcaUtils.h          |  11 +-
 lib/libhac/include/nn/hac/NpdmBinary.h        |  13 +-
 lib/libhac/include/nn/hac/NroHeader.h         |   8 +-
 lib/libhac/include/nn/hac/NsoHeader.h         |   8 +-
 lib/libhac/include/nn/hac/PfsHeader.h         |   9 +-
 .../nn/hac/ServiceAccessControlBinary.h       |   8 +-
 .../nn/hac/ServiceAccessControlEntry.h        |   5 +-
 lib/libhac/include/nn/hac/SystemCallEntry.h   |   8 +-
 lib/libhac/include/nn/hac/SystemCallHandler.h |   8 +-
 lib/libhac/include/nn/hac/ThreadInfoEntry.h   |   7 +-
 lib/libhac/include/nn/hac/ThreadInfoHandler.h |  10 +-
 lib/libhac/include/nn/hac/XciHeader.h         |   8 +-
 lib/libhac/include/nn/hac/XciUtils.h          |   9 +-
 lib/libhac/include/nn/hac/aci.h               |   7 +-
 lib/libhac/include/nn/hac/cnmt.h              |   5 +-
 lib/libhac/include/nn/hac/elf.h               |   5 +-
 lib/libhac/include/nn/hac/fac.h               |   5 +-
 .../include/nn/hac/hierarchicalintegrity.h    |   7 +-
 .../include/nn/hac/hierarchicalsha256.h       |   5 +-
 lib/libhac/include/nn/hac/kc.h                |   7 +-
 lib/libhac/include/nn/hac/nacp.h              |   5 +-
 lib/libhac/include/nn/hac/nca.h               |   9 +-
 lib/libhac/include/nn/hac/npdm.h              |   7 +-
 lib/libhac/include/nn/hac/nro.h               |   7 +-
 lib/libhac/include/nn/hac/nrr.h               |   7 +-
 lib/libhac/include/nn/hac/nso.h               |   7 +-
 lib/libhac/include/nn/hac/pfs.h               |   7 +-
 lib/libhac/include/nn/hac/romfs.h             |   5 +-
 lib/libhac/include/nn/hac/xci.h               |   7 +-
 lib/libhac/source/AccessControlInfoBinary.cpp |  36 ++--
 .../source/AccessControlInfoDescBinary.cpp    |  48 ++---
 lib/libhac/source/AesKeygen.cpp               |   8 +-
 .../ApplicationControlPropertyBinary.cpp      | 182 ++++++++---------
 .../ApplicationControlPropertyUtils.cpp       |   6 +-
 lib/libhac/source/ContentMetaBinary.cpp       |  78 ++++----
 .../source/FileSystemAccessControlBinary.cpp  |  36 ++--
 lib/libhac/source/HandleTableSizeEntry.cpp    |  22 +--
 lib/libhac/source/HandleTableSizeHandler.cpp  |  22 +--
 .../source/HierarchicalIntegrityHeader.cpp    |  40 ++--
 .../source/HierarchicalSha256Header.cpp       |  40 ++--
 lib/libhac/source/InteruptEntry.cpp           |  24 +--
 lib/libhac/source/InteruptHandler.cpp         |  22 +--
 lib/libhac/source/KernelCapabilityBinary.cpp  |  52 ++---
 lib/libhac/source/KernelCapabilityEntry.cpp   |  26 +--
 lib/libhac/source/KernelVersionEntry.cpp      |  26 +--
 lib/libhac/source/KernelVersionHandler.cpp    |  26 +--
 lib/libhac/source/MemoryMappingHandler.cpp    |  24 +--
 lib/libhac/source/MemoryPageEntry.cpp         |  32 +--
 lib/libhac/source/MiscFlagsEntry.cpp          |  22 +--
 lib/libhac/source/MiscFlagsHandler.cpp        |  22 +--
 lib/libhac/source/MiscParamsEntry.cpp         |  22 +--
 lib/libhac/source/MiscParamsHandler.cpp       |  22 +--
 lib/libhac/source/NcaHeader.cpp               |  74 +++----
 lib/libhac/source/NcaUtils.cpp                |  18 +-
 lib/libhac/source/NpdmBinary.cpp              |  60 +++---
 lib/libhac/source/NroHeader.cpp               |  64 +++---
 lib/libhac/source/NsoHeader.cpp               |  60 +++---
 lib/libhac/source/PfsHeader.cpp               |  34 ++--
 .../source/ServiceAccessControlBinary.cpp     |  24 +--
 .../source/ServiceAccessControlEntry.cpp      |  30 +--
 lib/libhac/source/SystemCallEntry.cpp         |  26 +--
 lib/libhac/source/SystemCallHandler.cpp       |  24 +--
 lib/libhac/source/ThreadInfoEntry.cpp         |  34 ++--
 lib/libhac/source/ThreadInfoHandler.cpp       |  34 ++--
 lib/libhac/source/XciHeader.cpp               | 138 ++++++-------
 lib/libhac/source/XciUtils.cpp                |  12 +-
 lib/liblz4/makefile                           |   2 +-
 lib/libpki/include/nn/pki/CertificateBody.h   |   5 +-
 lib/libpki/include/nn/pki/SignUtils.h         |   9 +-
 lib/libpki/include/nn/pki/SignatureBlock.h    |   5 +-
 lib/libpki/include/nn/pki/SignedData.h        |   4 +-
 lib/libpki/include/nn/pki/cert.h              |   3 +
 lib/libpki/include/nn/pki/sign.h              |   3 +
 lib/libpki/makefile                           |   5 +-
 lib/libpki/source/CertificateBody.cpp         |  48 ++---
 lib/libpki/source/SignUtils.cpp               |  30 +--
 lib/libpki/source/SignatureBlock.cpp          |  32 +--
 lib/libpolarssl/makefile                      |   2 +-
 programs/nstool/source/AssetProcess.cpp       |   4 +-
 programs/nstool/source/AssetProcess.h         |   4 +-
 programs/nstool/source/CnmtProcess.cpp        |  26 +--
 programs/nstool/source/CnmtProcess.h          |   6 +-
 programs/nstool/source/ElfSymbolParser.cpp    |  18 +-
 programs/nstool/source/ElfSymbolParser.h      |   8 +-
 programs/nstool/source/EsTikProcess.cpp       |   2 +-
 programs/nstool/source/EsTikProcess.h         |   6 +-
 programs/nstool/source/HashTreeMeta.cpp       |   8 +-
 programs/nstool/source/HashTreeMeta.h         |   8 +-
 programs/nstool/source/NacpProcess.cpp        | 170 ++++++++--------
 programs/nstool/source/NacpProcess.h          |   6 +-
 programs/nstool/source/NcaProcess.cpp         | 186 +++++++++---------
 programs/nstool/source/NcaProcess.h           |  16 +-
 programs/nstool/source/NpdmProcess.cpp        |  30 +--
 programs/nstool/source/NpdmProcess.h          |  22 +--
 programs/nstool/source/NroProcess.cpp         |  16 +-
 programs/nstool/source/NroProcess.h           |   8 +-
 programs/nstool/source/NsoProcess.cpp         |   8 +-
 programs/nstool/source/NsoProcess.h           |  10 +-
 programs/nstool/source/PfsProcess.cpp         |  26 +--
 programs/nstool/source/PfsProcess.h           |  10 +-
 programs/nstool/source/PkiCertProcess.cpp     |   2 +-
 programs/nstool/source/PkiCertProcess.h       |   4 +-
 programs/nstool/source/PkiValidator.cpp       |   2 +-
 programs/nstool/source/PkiValidator.h         |   4 +-
 programs/nstool/source/RoMetadataProcess.cpp  |  58 +++---
 programs/nstool/source/RoMetadataProcess.h    |  12 +-
 programs/nstool/source/RomfsProcess.cpp       |  30 +--
 programs/nstool/source/RomfsProcess.h         |  10 +-
 programs/nstool/source/UserSettings.cpp       | 114 +++++------
 programs/nstool/source/UserSettings.h         |  12 +-
 programs/nstool/source/XciProcess.cpp         |  42 ++--
 programs/nstool/source/XciProcess.h           |   6 +-
 programs/nstool/source/main.cpp               |   8 +-
 programs/nstool/source/nstool.h               |   4 +-
 150 files changed, 1690 insertions(+), 1533 deletions(-)

diff --git a/lib/libcompress/source/lz4_wrapper.cpp b/lib/libcompress/source/lz4_wrapper.cpp
index aa340d2..68b773c 100644
--- a/lib/libcompress/source/lz4_wrapper.cpp
+++ b/lib/libcompress/source/lz4_wrapper.cpp
@@ -1,5 +1,5 @@
 #include <compress/lz4.h>
-#include "lz4/lz4.h"
+#include <lz4.h>
 
 void compress::lz4::compressData(const uint8_t* src, uint32_t src_len, uint8_t* dst, uint32_t dst_capacity, uint32_t& compressed_size)
 {
diff --git a/lib/libes/include/nn/es/SectionHeader_V2.h b/lib/libes/include/nn/es/SectionHeader_V2.h
index 35b1083..eb7558b 100644
--- a/lib/libes/include/nn/es/SectionHeader_V2.h
+++ b/lib/libes/include/nn/es/SectionHeader_V2.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <string>
 #include <fnd/ISerialisable.h>
-#include <es/ticket.h>
+#include <nn/es/ticket.h>
 
+namespace nn
+{
 namespace es
 {
 	class SectionHeader_V2 :
@@ -52,5 +54,5 @@ namespace es
 		uint16_t mRecordNum;
 		ticket::SectionType mSectionType;
 	};
-
 }
+}
\ No newline at end of file
diff --git a/lib/libes/include/nn/es/TicketBody_V2.h b/lib/libes/include/nn/es/TicketBody_V2.h
index 4741cac..6c7150a 100644
--- a/lib/libes/include/nn/es/TicketBody_V2.h
+++ b/lib/libes/include/nn/es/TicketBody_V2.h
@@ -2,8 +2,10 @@
 #include <string>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
-#include <es/ticket.h>
+#include <nn/es/ticket.h>
 
+namespace nn
+{
 namespace es
 {
 	class TicketBody_V2 :
@@ -98,5 +100,4 @@ namespace es
 		uint16_t mSectEntrySize;
 	};
 }
-
-
+}
\ No newline at end of file
diff --git a/lib/libes/include/nn/es/ticket.h b/lib/libes/include/nn/es/ticket.h
index 689ecce..ffb483b 100644
--- a/lib/libes/include/nn/es/ticket.h
+++ b/lib/libes/include/nn/es/ticket.h
@@ -3,6 +3,8 @@
 #include <fnd/types.h>
 #include <crypto/rsa.h>
 
+namespace nn
+{
 namespace es
 {
 	namespace ticket
@@ -105,4 +107,5 @@ namespace es
 		inline uint16_t get_group(uint16_t index) const { return index & kGroupMask; }
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libes/source/SectionHeader_V2.cpp b/lib/libes/source/SectionHeader_V2.cpp
index 2fd18ac..ae5ad04 100644
--- a/lib/libes/source/SectionHeader_V2.cpp
+++ b/lib/libes/source/SectionHeader_V2.cpp
@@ -1,16 +1,14 @@
-#include <es/SectionHeader_V2.h>
+#include <nn/es/SectionHeader_V2.h>
 
-
-
-es::SectionHeader_V2::SectionHeader_V2()
+nn::es::SectionHeader_V2::SectionHeader_V2()
 {}
 
-es::SectionHeader_V2::SectionHeader_V2(const SectionHeader_V2 & other)
+nn::es::SectionHeader_V2::SectionHeader_V2(const SectionHeader_V2 & other)
 {
 	*this = other;
 }
 
-void es::SectionHeader_V2::operator=(const SectionHeader_V2 & other)
+void nn::es::SectionHeader_V2::operator=(const SectionHeader_V2 & other)
 {
 	if (other.getBytes().size())
 	{
@@ -27,7 +25,7 @@ void es::SectionHeader_V2::operator=(const SectionHeader_V2 & other)
 	}
 }
 
-bool es::SectionHeader_V2::operator==(const SectionHeader_V2 & other) const
+bool nn::es::SectionHeader_V2::operator==(const SectionHeader_V2 & other) const
 {
 	return (mSectionOffset == other.mSectionOffset) \
 		&& (mRecordSize == other.mRecordSize) \
@@ -36,12 +34,12 @@ bool es::SectionHeader_V2::operator==(const SectionHeader_V2 & other) const
 		&& (mSectionType == other.mSectionType);
 }
 
-bool es::SectionHeader_V2::operator!=(const SectionHeader_V2 & other) const
+bool nn::es::SectionHeader_V2::operator!=(const SectionHeader_V2 & other) const
 {
 	return !(*this ==other);
 }
 
-void es::SectionHeader_V2::toBytes()
+void nn::es::SectionHeader_V2::toBytes()
 {
 	mRawBinary.alloc(sizeof(sSectionHeader_v2));
 	sSectionHeader_v2* hdr = (sSectionHeader_v2*)mRawBinary.data();
@@ -53,7 +51,7 @@ void es::SectionHeader_V2::toBytes()
 	hdr->section_type = (mSectionType);
 }
 
-void es::SectionHeader_V2::fromBytes(const byte_t * bytes, size_t len)
+void nn::es::SectionHeader_V2::fromBytes(const byte_t * bytes, size_t len)
 {
 	if (len < sizeof(sSectionHeader_v2))
 	{
@@ -73,12 +71,12 @@ void es::SectionHeader_V2::fromBytes(const byte_t * bytes, size_t len)
 	mSectionType = (ticket::SectionType)hdr->section_type.get();
 }
 
-const fnd::Vec<byte_t>& es::SectionHeader_V2::getBytes() const
+const fnd::Vec<byte_t>& nn::es::SectionHeader_V2::getBytes() const
 {
 	return mRawBinary;
 }
 
-void es::SectionHeader_V2::clear()
+void nn::es::SectionHeader_V2::clear()
 {
 	mRawBinary.clear();
 	mSectionOffset = 0;
@@ -88,52 +86,52 @@ void es::SectionHeader_V2::clear()
 	mSectionType = ticket::SECTION_PERMANENT;
 }
 
-uint32_t es::SectionHeader_V2::getSectionOffset() const
+uint32_t nn::es::SectionHeader_V2::getSectionOffset() const
 {
 	return mSectionOffset;
 }
 
-void es::SectionHeader_V2::setSectionOffset(uint32_t offset)
+void nn::es::SectionHeader_V2::setSectionOffset(uint32_t offset)
 {
 	mSectionOffset = offset;
 }
 
-uint32_t es::SectionHeader_V2::getRecordSize() const
+uint32_t nn::es::SectionHeader_V2::getRecordSize() const
 {
 	return mRecordSize;
 }
 
-void es::SectionHeader_V2::setRecordSize(uint32_t size)
+void nn::es::SectionHeader_V2::setRecordSize(uint32_t size)
 {
 	mRecordSize = size;
 }
 
-uint32_t es::SectionHeader_V2::getSectionSize() const
+uint32_t nn::es::SectionHeader_V2::getSectionSize() const
 {
 	return mSectionSize;
 }
 
-void es::SectionHeader_V2::getSectionSize(uint32_t size)
+void nn::es::SectionHeader_V2::getSectionSize(uint32_t size)
 {
 	mSectionSize = size;
 }
 
-uint16_t es::SectionHeader_V2::getRecordNum() const
+uint16_t nn::es::SectionHeader_V2::getRecordNum() const
 {
 	return mRecordNum;
 }
 
-void es::SectionHeader_V2::setRecordNum(uint16_t record_num)
+void nn::es::SectionHeader_V2::setRecordNum(uint16_t record_num)
 {
 	mRecordNum = record_num;
 }
 
-es::ticket::SectionType es::SectionHeader_V2::getSectionType() const
+nn::es::ticket::SectionType nn::es::SectionHeader_V2::getSectionType() const
 {
 	return mSectionType;
 }
 
-void es::SectionHeader_V2::setSectionType(ticket::SectionType type)
+void nn::es::SectionHeader_V2::setSectionType(ticket::SectionType type)
 {
 	mSectionType = type;
 }
diff --git a/lib/libes/source/TicketBody_V2.cpp b/lib/libes/source/TicketBody_V2.cpp
index 93816c7..1a5302d 100644
--- a/lib/libes/source/TicketBody_V2.cpp
+++ b/lib/libes/source/TicketBody_V2.cpp
@@ -1,18 +1,16 @@
-#include <es/TicketBody_V2.h>
+#include <nn/es/TicketBody_V2.h>
 
-
-
-es::TicketBody_V2::TicketBody_V2()
+nn::es::TicketBody_V2::TicketBody_V2()
 {
 	clear();
 }
 
-es::TicketBody_V2::TicketBody_V2(const TicketBody_V2 & other)
+nn::es::TicketBody_V2::TicketBody_V2(const TicketBody_V2 & other)
 {
 	*this = other;
 }
 
-void es::TicketBody_V2::operator=(const TicketBody_V2 & other)
+void nn::es::TicketBody_V2::operator=(const TicketBody_V2 & other)
 {
 	if (other.getBytes().size())
 	{
@@ -40,7 +38,7 @@ void es::TicketBody_V2::operator=(const TicketBody_V2 & other)
 	}
 }
 
-bool es::TicketBody_V2::operator==(const TicketBody_V2 & other) const
+bool nn::es::TicketBody_V2::operator==(const TicketBody_V2 & other) const
 {
 	return (mIssuer == other.mIssuer) \
 		&& (memcmp(mEncTitleKey, other.mEncTitleKey, ticket::kEncTitleKeySize) == 0) \
@@ -59,12 +57,12 @@ bool es::TicketBody_V2::operator==(const TicketBody_V2 & other) const
 		&& (mSectEntrySize == other.mSectEntrySize);
 }
 
-bool es::TicketBody_V2::operator!=(const TicketBody_V2 & other) const
+bool nn::es::TicketBody_V2::operator!=(const TicketBody_V2 & other) const
 {
 	return !(*this == other);
 }
 
-void es::TicketBody_V2::toBytes()
+void nn::es::TicketBody_V2::toBytes()
 {
 	mRawBinary.alloc(sizeof(sTicketBody_v2));
 	sTicketBody_v2* body = (sTicketBody_v2*)mRawBinary.data();
@@ -94,7 +92,7 @@ void es::TicketBody_V2::toBytes()
 	body->sect_entry_size = (mSectEntrySize);
 }
 
-void es::TicketBody_V2::fromBytes(const byte_t * bytes, size_t len)
+void nn::es::TicketBody_V2::fromBytes(const byte_t * bytes, size_t len)
 {
 	if (len < sizeof(sTicketBody_v2))
 	{
@@ -134,12 +132,12 @@ void es::TicketBody_V2::fromBytes(const byte_t * bytes, size_t len)
 	mSectEntrySize = body->sect_entry_size.get();
 }
 
-const fnd::Vec<byte_t>& es::TicketBody_V2::getBytes() const
+const fnd::Vec<byte_t>& nn::es::TicketBody_V2::getBytes() const
 {
 	return mRawBinary;
 }
 
-void es::TicketBody_V2::clear()
+void nn::es::TicketBody_V2::clear()
 {
 	mRawBinary.clear();
 	mIssuer.clear();
@@ -160,12 +158,12 @@ void es::TicketBody_V2::clear()
 	mSectEntrySize = 0;
 }
 
-const std::string & es::TicketBody_V2::getIssuer() const
+const std::string & nn::es::TicketBody_V2::getIssuer() const
 {
 	return mIssuer;
 }
 
-void es::TicketBody_V2::setIssuer(const std::string & issuer)
+void nn::es::TicketBody_V2::setIssuer(const std::string & issuer)
 {
 	if (issuer.length() > ticket::kIssuerSize)
 	{
@@ -175,154 +173,154 @@ void es::TicketBody_V2::setIssuer(const std::string & issuer)
 	mIssuer = issuer;
 }
 
-const byte_t * es::TicketBody_V2::getEncTitleKey() const
+const byte_t * nn::es::TicketBody_V2::getEncTitleKey() const
 {
 	return mEncTitleKey;
 }
 
-void es::TicketBody_V2::setEncTitleKey(const byte_t * data, size_t len)
+void nn::es::TicketBody_V2::setEncTitleKey(const byte_t * data, size_t len)
 {
 	memset(mEncTitleKey, 0, ticket::kEncTitleKeySize);
 	memcpy(mEncTitleKey, data, _MIN(len, ticket::kEncTitleKeySize));
 }
 
-es::ticket::TitleKeyEncType es::TicketBody_V2::getTitleKeyEncType() const
+nn::es::ticket::TitleKeyEncType nn::es::TicketBody_V2::getTitleKeyEncType() const
 {
 	return mEncType;
 }
 
-void es::TicketBody_V2::setTitleKeyEncType(ticket::TitleKeyEncType type)
+void nn::es::TicketBody_V2::setTitleKeyEncType(ticket::TitleKeyEncType type)
 {
 	mEncType = type;
 }
 
-uint16_t es::TicketBody_V2::getTicketVersion() const
+uint16_t nn::es::TicketBody_V2::getTicketVersion() const
 {
 	return mTicketVersion;
 }
 
-void es::TicketBody_V2::setTicketVersion(uint16_t version)
+void nn::es::TicketBody_V2::setTicketVersion(uint16_t version)
 {
 	mTicketVersion = version;
 }
 
-es::ticket::LicenseType es::TicketBody_V2::getLicenseType() const
+nn::es::ticket::LicenseType nn::es::TicketBody_V2::getLicenseType() const
 {
 	return mLicenseType;
 }
 
-void es::TicketBody_V2::setLicenseType(ticket::LicenseType type)
+void nn::es::TicketBody_V2::setLicenseType(ticket::LicenseType type)
 {
 	mLicenseType = type;
 }
 
-byte_t es::TicketBody_V2::getCommonKeyId() const
+byte_t nn::es::TicketBody_V2::getCommonKeyId() const
 {
 	return mCommonKeyId;
 }
 
-void es::TicketBody_V2::setCommonKeyId(byte_t id)
+void nn::es::TicketBody_V2::setCommonKeyId(byte_t id)
 {
 	mCommonKeyId = id;
 }
 
-const fnd::List<es::ticket::PropertyMaskFlags>& es::TicketBody_V2::getPropertyFlags() const
+const fnd::List<nn::es::ticket::PropertyMaskFlags>& nn::es::TicketBody_V2::getPropertyFlags() const
 {
 	return mPropertyFlags;
 }
 
-void es::TicketBody_V2::setPropertyFlags(const fnd::List<es::ticket::PropertyMaskFlags>& flags)
+void nn::es::TicketBody_V2::setPropertyFlags(const fnd::List<nn::es::ticket::PropertyMaskFlags>& flags)
 {
 	mPropertyFlags = flags;
 }
 
-const byte_t * es::TicketBody_V2::getReservedRegion() const
+const byte_t * nn::es::TicketBody_V2::getReservedRegion() const
 {
 	return mReservedRegion;
 }
 
-void es::TicketBody_V2::setReservedRegion(const byte_t * data, size_t len)
+void nn::es::TicketBody_V2::setReservedRegion(const byte_t * data, size_t len)
 {
 	memset(mReservedRegion, 0, ticket::kReservedRegionSize);
 	memcpy(mReservedRegion, data, _MIN(len, ticket::kReservedRegionSize));
 }
 
-uint64_t es::TicketBody_V2::getTicketId() const
+uint64_t nn::es::TicketBody_V2::getTicketId() const
 {
 	return mTicketId;
 }
 
-void es::TicketBody_V2::setTicketId(uint64_t id)
+void nn::es::TicketBody_V2::setTicketId(uint64_t id)
 {
 	mTicketId = id;
 }
 
-uint64_t es::TicketBody_V2::getDeviceId() const
+uint64_t nn::es::TicketBody_V2::getDeviceId() const
 {
 	return mDeviceId;
 }
 
-void es::TicketBody_V2::setDeviceId(uint64_t id)
+void nn::es::TicketBody_V2::setDeviceId(uint64_t id)
 {
 	mDeviceId = id;
 }
 
-const byte_t * es::TicketBody_V2::getRightsId() const
+const byte_t * nn::es::TicketBody_V2::getRightsId() const
 {
 	return mRightsId;
 }
 
-void es::TicketBody_V2::setRightsId(const byte_t * id)
+void nn::es::TicketBody_V2::setRightsId(const byte_t * id)
 {
 	memcpy(mRightsId, id, ticket::kRightsIdSize);
 }
 
-uint32_t es::TicketBody_V2::getAccountId() const
+uint32_t nn::es::TicketBody_V2::getAccountId() const
 {
 	return mAccountId;
 }
 
-void es::TicketBody_V2::setAccountId(uint32_t id)
+void nn::es::TicketBody_V2::setAccountId(uint32_t id)
 {
 	mAccountId = id;
 }
 
-uint32_t es::TicketBody_V2::getSectionTotalSize() const
+uint32_t nn::es::TicketBody_V2::getSectionTotalSize() const
 {
 	return mSectTotalSize;
 }
 
-void es::TicketBody_V2::setSectionTotalSize(uint32_t size)
+void nn::es::TicketBody_V2::setSectionTotalSize(uint32_t size)
 {
 	mSectTotalSize = size;
 }
 
-uint32_t es::TicketBody_V2::getSectionHeaderOffset() const
+uint32_t nn::es::TicketBody_V2::getSectionHeaderOffset() const
 {
 	return mSectHeaderOffset;
 }
 
-void es::TicketBody_V2::setSectionHeaderOffset(uint32_t offset)
+void nn::es::TicketBody_V2::setSectionHeaderOffset(uint32_t offset)
 {
 	mSectHeaderOffset = offset;
 }
 
-uint16_t es::TicketBody_V2::getSectionNum() const
+uint16_t nn::es::TicketBody_V2::getSectionNum() const
 {
 	return mSectNum;
 }
 
-void es::TicketBody_V2::setSectionNum(uint16_t num)
+void nn::es::TicketBody_V2::setSectionNum(uint16_t num)
 {
 	mSectNum = num;
 }
 
-uint16_t es::TicketBody_V2::getSectionEntrySize() const
+uint16_t nn::es::TicketBody_V2::getSectionEntrySize() const
 {
 	return mSectEntrySize;
 }
 
-void es::TicketBody_V2::setSectionEntrySize(uint16_t size)
+void nn::es::TicketBody_V2::setSectionEntrySize(uint16_t size)
 {
 	mSectEntrySize = size;
 }
\ No newline at end of file
diff --git a/lib/libhac-hb/include/nn/hac/AssetHeader.h b/lib/libhac-hb/include/nn/hac/AssetHeader.h
index 61deecb..bbef068 100644
--- a/lib/libhac-hb/include/nn/hac/AssetHeader.h
+++ b/lib/libhac-hb/include/nn/hac/AssetHeader.h
@@ -1,9 +1,11 @@
 #pragma once
-#include <nx/aset.h>
+#include <nn/hac/aset.h>
 #include <fnd/List.h>
 #include <fnd/ISerialisable.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class AssetHeader : 
 		public fnd::ISerialisable
@@ -66,5 +68,5 @@ namespace nx
 		sSection mNacpInfo;
 		sSection mRomfsInfo;
 	};
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac-hb/include/nn/hac/aset.h b/lib/libhac-hb/include/nn/hac/aset.h
index 9e821cb..f7c1bfd 100644
--- a/lib/libhac-hb/include/nn/hac/aset.h
+++ b/lib/libhac-hb/include/nn/hac/aset.h
@@ -1,8 +1,10 @@
 #pragma once
-
 #include <fnd/types.h>
-#include <nx/macro.h>
-namespace nx
+#include <nn/hac/macro.h>
+
+namespace nn
+{
+namespace hac
 {
 	namespace aset
 	{
@@ -27,4 +29,5 @@ namespace nx
 		sAssetSection romfs;
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libhac-hb/include/nn/hac/nro-hb.h b/lib/libhac-hb/include/nn/hac/nro-hb.h
index 5e5bd05..a1dcc67 100644
--- a/lib/libhac-hb/include/nn/hac/nro-hb.h
+++ b/lib/libhac-hb/include/nn/hac/nro-hb.h
@@ -1,11 +1,14 @@
 #pragma once
+#include <nn/hac/nro.h>
+#include <nn/hac/macro.h>
 
-#include <nx/nro.h>
-#include <nx/macro.h>
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace nro
 	{
 		static const uint64_t kNroHomebrewStructMagic = _MAKE_STRUCT_MAGIC_U64("HOMEBREW");
 	}
+}
 }
\ No newline at end of file
diff --git a/lib/libhac-hb/makefile b/lib/libhac-hb/makefile
index fd763c5..c91b3df 100644
--- a/lib/libhac-hb/makefile
+++ b/lib/libhac-hb/makefile
@@ -3,7 +3,7 @@ SRC_DIR = source
 OBJS = $(foreach dir,$(SRC_DIR),$(subst .cpp,.o,$(wildcard $(dir)/*.cpp))) $(foreach dir,$(SRC_DIR),$(subst .c,.o,$(wildcard $(dir)/*.c)))
 
 # External dependencies
-DEPENDS = fnd crypto nx
+DEPENDS = fnd crypto hac
 LIB_DIR = ..
 INCS = -I"include" $(foreach dep,$(DEPENDS), -I"$(LIB_DIR)/lib$(dep)/include")
 
diff --git a/lib/libhac-hb/source/AssetHeader.cpp b/lib/libhac-hb/source/AssetHeader.cpp
index 0f8eebb..aab6fe4 100644
--- a/lib/libhac-hb/source/AssetHeader.cpp
+++ b/lib/libhac-hb/source/AssetHeader.cpp
@@ -1,16 +1,16 @@
-#include <nx/AssetHeader.h>
+#include <nn/hac/AssetHeader.h>
 
-nx::AssetHeader::AssetHeader()
+nn::hac::AssetHeader::AssetHeader()
 {
 	clear();
 }
 
-nx::AssetHeader::AssetHeader(const AssetHeader& other)
+nn::hac::AssetHeader::AssetHeader(const AssetHeader& other)
 {
 	*this = other;
 }
 
-void nx::AssetHeader::operator=(const AssetHeader& other)
+void nn::hac::AssetHeader::operator=(const AssetHeader& other)
 {
 	mRawBinary = other.mRawBinary;
 	mIconInfo = other.mIconInfo;
@@ -18,22 +18,22 @@ void nx::AssetHeader::operator=(const AssetHeader& other)
 	mRomfsInfo = other.mRomfsInfo;
 }
 
-bool nx::AssetHeader::operator==(const AssetHeader& other) const
+bool nn::hac::AssetHeader::operator==(const AssetHeader& other) const
 {
 	return (mIconInfo == other.mIconInfo) \
 		&& (mNacpInfo == other.mNacpInfo) \
 		&& (mRomfsInfo == other.mRomfsInfo);
 }
 
-bool nx::AssetHeader::operator!=(const AssetHeader& other) const
+bool nn::hac::AssetHeader::operator!=(const AssetHeader& other) const
 {
 	return !(*this == other);
 }
 
-void nx::AssetHeader::toBytes()
+void nn::hac::AssetHeader::toBytes()
 {
 	mRawBinary.alloc(sizeof(sAssetHeader));
-	nx::sAssetHeader* hdr = (nx::sAssetHeader*)mRawBinary.data();
+	nn::hac::sAssetHeader* hdr = (nn::hac::sAssetHeader*)mRawBinary.data();
 
 	// set header identifers
 	hdr->st_magic = aset::kAssetStructMagic;
@@ -52,7 +52,7 @@ void nx::AssetHeader::toBytes()
 	hdr->romfs.size = mRomfsInfo.size;
 }
 
-void nx::AssetHeader::fromBytes(const byte_t* bytes, size_t len)
+void nn::hac::AssetHeader::fromBytes(const byte_t* bytes, size_t len)
 {
 	// check input data size
 	if (len < sizeof(sAssetHeader))
@@ -68,7 +68,7 @@ void nx::AssetHeader::fromBytes(const byte_t* bytes, size_t len)
 	memcpy(mRawBinary.data(), bytes, mRawBinary.size());
 
 	// get sAssetHeader ptr
-	const nx::sAssetHeader* hdr = (const nx::sAssetHeader*)mRawBinary.data();
+	const nn::hac::sAssetHeader* hdr = (const nn::hac::sAssetHeader*)mRawBinary.data();
 	
 	// check NRO signature
 	if (hdr->st_magic.get() != aset::kAssetStructMagic)
@@ -90,12 +90,12 @@ void nx::AssetHeader::fromBytes(const byte_t* bytes, size_t len)
 	mRomfsInfo.size = hdr->romfs.size.get();
 }
 
-const fnd::Vec<byte_t>& nx::AssetHeader::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::AssetHeader::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::AssetHeader::clear()
+void nn::hac::AssetHeader::clear()
 {
 	mRawBinary.clear();
 	memset(&mIconInfo, 0, sizeof(mIconInfo));
@@ -103,32 +103,32 @@ void nx::AssetHeader::clear()
 	memset(&mRomfsInfo, 0, sizeof(mRomfsInfo));
 }
 
-const nx::AssetHeader::sSection& nx::AssetHeader::getIconInfo() const
+const nn::hac::AssetHeader::sSection& nn::hac::AssetHeader::getIconInfo() const
 {
 	return mIconInfo;
 }
 
-void nx::AssetHeader::setIconInfo(const nx::AssetHeader::sSection& info)
+void nn::hac::AssetHeader::setIconInfo(const nn::hac::AssetHeader::sSection& info)
 {
 	mIconInfo = info;
 }
 
-const nx::AssetHeader::sSection& nx::AssetHeader::getNacpInfo() const
+const nn::hac::AssetHeader::sSection& nn::hac::AssetHeader::getNacpInfo() const
 {
 	return mNacpInfo;
 }
 
-void nx::AssetHeader::setNacpInfo(const sSection& info)
+void nn::hac::AssetHeader::setNacpInfo(const sSection& info)
 {
 	mNacpInfo = info;
 }
 
-const nx::AssetHeader::sSection& nx::AssetHeader::getRomfsInfo() const
+const nn::hac::AssetHeader::sSection& nn::hac::AssetHeader::getRomfsInfo() const
 {
 	return mRomfsInfo;
 }
 
-void nx::AssetHeader::setRomfsInfo(const sSection& info)
+void nn::hac::AssetHeader::setRomfsInfo(const sSection& info)
 {
 	mRomfsInfo = info;
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/AccessControlInfoBinary.h b/lib/libhac/include/nn/hac/AccessControlInfoBinary.h
index f16cc20..3fa1763 100644
--- a/lib/libhac/include/nn/hac/AccessControlInfoBinary.h
+++ b/lib/libhac/include/nn/hac/AccessControlInfoBinary.h
@@ -2,12 +2,14 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/ISerialisable.h>
-#include <nx/aci.h>
-#include <nx/FileSystemAccessControlBinary.h>
-#include <nx/ServiceAccessControlBinary.h>
-#include <nx/KernelCapabilityBinary.h>
+#include <nn/hac/aci.h>
+#include <nn/hac/FileSystemAccessControlBinary.h>
+#include <nn/hac/ServiceAccessControlBinary.h>
+#include <nn/hac/KernelCapabilityBinary.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class AccessControlInfoBinary : public fnd::ISerialisable
 	{
@@ -30,13 +32,13 @@ namespace nx
 		uint64_t getProgramId() const;
 		void setProgramId(uint64_t program_id);
 
-		const nx::FileSystemAccessControlBinary& getFileSystemAccessControl() const;
+		const nn::hac::FileSystemAccessControlBinary& getFileSystemAccessControl() const;
 		void setFileSystemAccessControl(const FileSystemAccessControlBinary& fac);
 
-		const nx::ServiceAccessControlBinary& getServiceAccessControl() const;
+		const nn::hac::ServiceAccessControlBinary& getServiceAccessControl() const;
 		void setServiceAccessControl(const ServiceAccessControlBinary& sac);
 
-		const nx::KernelCapabilityBinary& getKernelCapabilities() const;
+		const nn::hac::KernelCapabilityBinary& getKernelCapabilities() const;
 		void setKernelCapabilities(const KernelCapabilityBinary& kc);
 	private:
 		const std::string kModuleName = "ACCESS_CONTROL_INFO_BINARY";
@@ -46,8 +48,9 @@ namespace nx
 
 		// variables
 		uint64_t mProgramId;
-		nx::FileSystemAccessControlBinary mFileSystemAccessControl;
-		nx::ServiceAccessControlBinary mServiceAccessControl;
-		nx::KernelCapabilityBinary mKernelCapabilities;
+		nn::hac::FileSystemAccessControlBinary mFileSystemAccessControl;
+		nn::hac::ServiceAccessControlBinary mServiceAccessControl;
+		nn::hac::KernelCapabilityBinary mKernelCapabilities;
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h b/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h
index 53519a8..f42b195 100644
--- a/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h
+++ b/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h
@@ -3,12 +3,14 @@
 #include <fnd/types.h>
 #include <fnd/List.h>
 #include <fnd/ISerialisable.h>
-#include <nx/aci.h>
-#include <nx/FileSystemAccessControlBinary.h>
-#include <nx/ServiceAccessControlBinary.h>
-#include <nx/KernelCapabilityBinary.h>
+#include <nn/hac/aci.h>
+#include <nn/hac/FileSystemAccessControlBinary.h>
+#include <nn/hac/ServiceAccessControlBinary.h>
+#include <nn/hac/KernelCapabilityBinary.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class AccessControlInfoDescBinary : public fnd::ISerialisable
 	{
@@ -63,13 +65,13 @@ namespace nx
 		const sProgramIdRestrict& getProgramIdRestrict() const;
 		void setProgramIdRestrict(const sProgramIdRestrict& pid_restrict);
 
-		const nx::FileSystemAccessControlBinary& getFileSystemAccessControl() const;
+		const nn::hac::FileSystemAccessControlBinary& getFileSystemAccessControl() const;
 		void setFileSystemAccessControl(const FileSystemAccessControlBinary& fac);
 
-		const nx::ServiceAccessControlBinary& getServiceAccessControl() const;
+		const nn::hac::ServiceAccessControlBinary& getServiceAccessControl() const;
 		void setServiceAccessControl(const ServiceAccessControlBinary& sac);
 
-		const nx::KernelCapabilityBinary& getKernelCapabilities() const;
+		const nn::hac::KernelCapabilityBinary& getKernelCapabilities() const;
 		void setKernelCapabilities(const KernelCapabilityBinary& kc);
 	private:
 		const std::string kModuleName = "ACCESS_CONTROL_INFO_DESC_BINARY";
@@ -81,8 +83,9 @@ namespace nx
 		crypto::rsa::sRsa2048Key mNcaHeaderSignature2Key;
 		fnd::List<aci::Flag> mFlags;
 		sProgramIdRestrict mProgramIdRestrict;
-		nx::FileSystemAccessControlBinary mFileSystemAccessControl;
-		nx::ServiceAccessControlBinary mServiceAccessControl;
-		nx::KernelCapabilityBinary mKernelCapabilities;
+		nn::hac::FileSystemAccessControlBinary mFileSystemAccessControl;
+		nn::hac::ServiceAccessControlBinary mServiceAccessControl;
+		nn::hac::KernelCapabilityBinary mKernelCapabilities;
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/AesKeygen.h b/lib/libhac/include/nn/hac/AesKeygen.h
index 64333a0..8d30eba 100644
--- a/lib/libhac/include/nn/hac/AesKeygen.h
+++ b/lib/libhac/include/nn/hac/AesKeygen.h
@@ -3,7 +3,9 @@
 #include <fnd/types.h>
 #include <crypto/aes.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class AesKeygen
 	{
@@ -16,4 +18,5 @@ namespace nx
 		// 3 stage key generation dst = ((src1_key.decrypt(src1)).decrypt(src2)).decrypt(src3)
 		static void generateKey(byte_t* dst, const byte_t* src1, const byte_t* src2, const byte_t* src3, const byte_t* src1_key);
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h b/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h
index ae28816..af69e42 100644
--- a/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h
+++ b/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h
@@ -3,9 +3,11 @@
 #include <fnd/types.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
-#include <nx/nacp.h>
+#include <nn/hac/nacp.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class ApplicationControlPropertyBinary :
 		public fnd::ISerialisable
@@ -229,7 +231,7 @@ namespace nx
 		nacp::TouchScreenUsageMode mTouchScreenUsageMode;
 		nacp::AocRegistrationType mAocRegistrationType;
 		nacp::AttributeFlag mAttributeFlag;
-		fnd::List<nx::nacp::Language> mSupportedLanguages;
+		fnd::List<nn::hac::nacp::Language> mSupportedLanguages;
 		nacp::ParentalControlFlag mParentalControlFlag;
 		nacp::ScreenshotMode mScreenshotMode;
 		nacp::VideoCaptureMode mVideoCaptureMode;
@@ -263,4 +265,5 @@ namespace nx
 		nacp::RepairFlag mRepairFlag;
 		byte_t mProgramIndex;
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/ApplicationControlPropertyUtils.h b/lib/libhac/include/nn/hac/ApplicationControlPropertyUtils.h
index e6be804..9955de3 100644
--- a/lib/libhac/include/nn/hac/ApplicationControlPropertyUtils.h
+++ b/lib/libhac/include/nn/hac/ApplicationControlPropertyUtils.h
@@ -1,7 +1,9 @@
 #pragma once
-#include <nx/nacp.h>
+#include <nn/hac/nacp.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class ApplicationControlPropertyUtils
 	{
@@ -9,4 +11,5 @@ namespace nx
 		static bool validateSaveDataSizeMax(int64_t size, int64_t alignment);
 		static bool validateSaveDataSize(int64_t size);
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/ContentMetaBinary.h b/lib/libhac/include/nn/hac/ContentMetaBinary.h
index 59eee5d..2b44913 100644
--- a/lib/libhac/include/nn/hac/ContentMetaBinary.h
+++ b/lib/libhac/include/nn/hac/ContentMetaBinary.h
@@ -2,10 +2,11 @@
 #include <string>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
-#include <nx/cnmt.h>
+#include <nn/hac/cnmt.h>
 
-
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class ContentMetaBinary :
 		public fnd::ISerialisable
@@ -200,17 +201,17 @@ namespace nx
 		const DeltaMetaExtendedHeader& getDeltaMetaExtendedHeader() const;
 		void setDeltaMetaExtendedHeader(const DeltaMetaExtendedHeader& exhdr);
 
-		const fnd::List<nx::ContentMetaBinary::ContentInfo>& getContentInfo() const;
-		void setContentInfo(const fnd::List<nx::ContentMetaBinary::ContentInfo>& info);
+		const fnd::List<nn::hac::ContentMetaBinary::ContentInfo>& getContentInfo() const;
+		void setContentInfo(const fnd::List<nn::hac::ContentMetaBinary::ContentInfo>& info);
 
-		const fnd::List<nx::ContentMetaBinary::ContentMetaInfo>& getContentMetaInfo() const;
-		void setContentMetaInfo(const fnd::List<nx::ContentMetaBinary::ContentMetaInfo>& info);
+		const fnd::List<nn::hac::ContentMetaBinary::ContentMetaInfo>& getContentMetaInfo() const;
+		void setContentMetaInfo(const fnd::List<nn::hac::ContentMetaBinary::ContentMetaInfo>& info);
 
 		const fnd::Vec<byte_t>& getExtendedData() const;
 		void setExtendedData(const fnd::Vec<byte_t>& data);
 
-		const nx::sDigest& getDigest() const;
-		void setDigest(const nx::sDigest& digest);
+		const nn::hac::sDigest& getDigest() const;
+		void setDigest(const nn::hac::sDigest& digest);
 
 
 	private:
@@ -232,10 +233,10 @@ namespace nx
 		AddOnContentMetaExtendedHeader mAddOnContentMetaExtendedHeader;
 		DeltaMetaExtendedHeader mDeltaMetaExtendedHeader;
 
-		fnd::List<nx::ContentMetaBinary::ContentInfo> mContentInfo;
-		fnd::List<nx::ContentMetaBinary::ContentMetaInfo> mContentMetaInfo;
+		fnd::List<nn::hac::ContentMetaBinary::ContentInfo> mContentInfo;
+		fnd::List<nn::hac::ContentMetaBinary::ContentMetaInfo> mContentMetaInfo;
 		fnd::Vec<byte_t> mExtendedData;
-		nx::sDigest mDigest;
+		nn::hac::sDigest mDigest;
 
 		inline size_t getExtendedHeaderOffset() const { return sizeof(sContentMetaHeader); }
 		inline size_t getContentInfoOffset(size_t exhdrSize) const { return getExtendedHeaderOffset() + exhdrSize; }
@@ -248,4 +249,5 @@ namespace nx
 		size_t getExtendedDataSize(cnmt::ContentMetaType type, const byte_t* data) const;
 		void validateBinary(const byte_t* bytes, size_t len) const;
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h b/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h
index 90d6663..dbf898a 100644
--- a/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h
+++ b/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h
@@ -3,17 +3,18 @@
 #include <fnd/types.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
-#include <nx/fac.h>
+#include <nn/hac/fac.h>
 
-
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class FileSystemAccessControlBinary : public fnd::ISerialisable
 	{
 	public:
 		struct sSaveDataOwnerId
 		{
-			nx::fac::SaveDataOwnerIdAccessType access_type;
+			nn::hac::fac::SaveDataOwnerIdAccessType access_type;
 			uint64_t id;
 
 			void operator=(const sSaveDataOwnerId& other)
@@ -72,4 +73,5 @@ namespace nx
 		fnd::List<uint64_t> mContentOwnerIdList;
 		fnd::List<sSaveDataOwnerId> mSaveDataOwnerIdList;
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/HandleTableSizeEntry.h b/lib/libhac/include/nn/hac/HandleTableSizeEntry.h
index 18c92e8..5ef89df 100644
--- a/lib/libhac/include/nn/hac/HandleTableSizeEntry.h
+++ b/lib/libhac/include/nn/hac/HandleTableSizeEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class HandleTableSizeEntry
 	{
@@ -44,4 +46,5 @@ namespace nx
 			mHandleTableSize = field & kMaxHandleTableSize;
 		}
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/HandleTableSizeHandler.h b/lib/libhac/include/nn/hac/HandleTableSizeHandler.h
index 3094df8..200036d 100644
--- a/lib/libhac/include/nn/hac/HandleTableSizeHandler.h
+++ b/lib/libhac/include/nn/hac/HandleTableSizeHandler.h
@@ -1,8 +1,10 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
-#include <nx/HandleTableSizeEntry.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
+#include <nn/hac/HandleTableSizeEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class HandleTableSizeHandler :
 		public IKernelCapabilityHandler
@@ -32,4 +34,4 @@ namespace nx
 		HandleTableSizeEntry mEntry;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h b/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h
index b0d0945..e8c9a3a 100644
--- a/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h
+++ b/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h
@@ -1,10 +1,12 @@
 #pragma once
-#include <nx/hierarchicalintegrity.h>
+#include <nn/hac/hierarchicalintegrity.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
 #include <crypto/sha.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class HierarchicalIntegrityHeader :
 		public fnd::ISerialisable
@@ -64,5 +66,5 @@ namespace nx
 		fnd::List<sLayer> mLayerInfo;
 		fnd::List<crypto::sha::sSha256Hash> mMasterHashList;
 	};
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/HierarchicalSha256Header.h b/lib/libhac/include/nn/hac/HierarchicalSha256Header.h
index 4082916..eea54be 100644
--- a/lib/libhac/include/nn/hac/HierarchicalSha256Header.h
+++ b/lib/libhac/include/nn/hac/HierarchicalSha256Header.h
@@ -1,9 +1,11 @@
 #pragma once
-#include <nx/hierarchicalsha256.h>
+#include <nn/hac/hierarchicalsha256.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class HierarchicalSha256Header :
 		public fnd::ISerialisable
@@ -65,5 +67,5 @@ namespace nx
 		size_t mHashBlockSize;
 		fnd::List<sLayer> mLayerInfo;
 	};
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/IKernelCapabilityHandler.h b/lib/libhac/include/nn/hac/IKernelCapabilityHandler.h
index ad117c4..7437465 100644
--- a/lib/libhac/include/nn/hac/IKernelCapabilityHandler.h
+++ b/lib/libhac/include/nn/hac/IKernelCapabilityHandler.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <fnd/types.h>
 #include <fnd/List.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class IKernelCapabilityHandler
 	{
@@ -14,4 +16,4 @@ namespace nx
 		virtual bool isSet() const = 0;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/InteruptEntry.h b/lib/libhac/include/nn/hac/InteruptEntry.h
index 7633281..9998fb6 100644
--- a/lib/libhac/include/nn/hac/InteruptEntry.h
+++ b/lib/libhac/include/nn/hac/InteruptEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class InteruptEntry
 	{
@@ -52,5 +54,5 @@ namespace nx
 			mInterupt[1] = (field >> kInteruptBits) & kInteruptMax;
 		}
 	};
-
+}
 }
diff --git a/lib/libhac/include/nn/hac/InteruptHandler.h b/lib/libhac/include/nn/hac/InteruptHandler.h
index 529886f..156b992 100644
--- a/lib/libhac/include/nn/hac/InteruptHandler.h
+++ b/lib/libhac/include/nn/hac/InteruptHandler.h
@@ -1,8 +1,10 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
-#include <nx/InteruptEntry.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
+#include <nn/hac/InteruptEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class InteruptHandler :
 		public IKernelCapabilityHandler
@@ -31,4 +33,4 @@ namespace nx
 		fnd::List<uint16_t> mInterupts;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/KernelCapabilityBinary.h b/lib/libhac/include/nn/hac/KernelCapabilityBinary.h
index d5369a3..72869c3 100644
--- a/lib/libhac/include/nn/hac/KernelCapabilityBinary.h
+++ b/lib/libhac/include/nn/hac/KernelCapabilityBinary.h
@@ -3,16 +3,18 @@
 #include <vector>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
-#include <nx/ThreadInfoHandler.h>
-#include <nx/SystemCallHandler.h>
-#include <nx/MemoryMappingHandler.h>
-#include <nx/InteruptHandler.h>
-#include <nx/MiscParamsHandler.h>
-#include <nx/KernelVersionHandler.h>
-#include <nx/HandleTableSizeHandler.h>
-#include <nx/MiscFlagsHandler.h>
+#include <nn/hac/ThreadInfoHandler.h>
+#include <nn/hac/SystemCallHandler.h>
+#include <nn/hac/MemoryMappingHandler.h>
+#include <nn/hac/InteruptHandler.h>
+#include <nn/hac/MiscParamsHandler.h>
+#include <nn/hac/KernelVersionHandler.h>
+#include <nn/hac/HandleTableSizeHandler.h>
+#include <nn/hac/MiscFlagsHandler.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class KernelCapabilityBinary :
 		public fnd::ISerialisable
@@ -73,4 +75,4 @@ namespace nx
 		MiscFlagsHandler mMiscFlags;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/KernelCapabilityEntry.h b/lib/libhac/include/nn/hac/KernelCapabilityEntry.h
index 9be2761..e8711e3 100644
--- a/lib/libhac/include/nn/hac/KernelCapabilityEntry.h
+++ b/lib/libhac/include/nn/hac/KernelCapabilityEntry.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <fnd/types.h>
-#include <nx/kc.h>
+#include <nn/hac/kc.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class KernelCapabilityEntry
 	{
@@ -47,4 +49,4 @@ namespace nx
 		}
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/KernelVersionEntry.h b/lib/libhac/include/nn/hac/KernelVersionEntry.h
index d0b339b..ed52714 100644
--- a/lib/libhac/include/nn/hac/KernelVersionEntry.h
+++ b/lib/libhac/include/nn/hac/KernelVersionEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class KernelVersionEntry
 	{
@@ -53,4 +55,4 @@ namespace nx
 		}
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/KernelVersionHandler.h b/lib/libhac/include/nn/hac/KernelVersionHandler.h
index be9cc2e..fe43226 100644
--- a/lib/libhac/include/nn/hac/KernelVersionHandler.h
+++ b/lib/libhac/include/nn/hac/KernelVersionHandler.h
@@ -1,8 +1,10 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
-#include <nx/KernelVersionEntry.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
+#include <nn/hac/KernelVersionEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class KernelVersionHandler :
 		public IKernelCapabilityHandler
@@ -34,4 +36,4 @@ namespace nx
 		KernelVersionEntry mEntry;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/MemoryMappingHandler.h b/lib/libhac/include/nn/hac/MemoryMappingHandler.h
index 9b5e0d4..d4d73d7 100644
--- a/lib/libhac/include/nn/hac/MemoryMappingHandler.h
+++ b/lib/libhac/include/nn/hac/MemoryMappingHandler.h
@@ -1,7 +1,9 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class MemoryMappingHandler :
 		public IKernelCapabilityHandler
@@ -75,4 +77,4 @@ namespace nx
 		fnd::List<sMemoryMapping> mMemPage;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/MemoryPageEntry.h b/lib/libhac/include/nn/hac/MemoryPageEntry.h
index 9fc4536..368b233 100644
--- a/lib/libhac/include/nn/hac/MemoryPageEntry.h
+++ b/lib/libhac/include/nn/hac/MemoryPageEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class MemoryPageEntry
 	{
@@ -56,5 +58,5 @@ namespace nx
 			mUseFlag = mCap.getType() == kc::KC_MEMORY_MAP;
 		}
 	};
-
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/MiscFlagsEntry.h b/lib/libhac/include/nn/hac/MiscFlagsEntry.h
index 34167e0..359589c 100644
--- a/lib/libhac/include/nn/hac/MiscFlagsEntry.h
+++ b/lib/libhac/include/nn/hac/MiscFlagsEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class MiscFlagsEntry
 	{
@@ -44,5 +46,5 @@ namespace nx
 			mFlags = field & kMaxVal;
 		}
 	};
-
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/MiscFlagsHandler.h b/lib/libhac/include/nn/hac/MiscFlagsHandler.h
index 41d3bf9..8351120 100644
--- a/lib/libhac/include/nn/hac/MiscFlagsHandler.h
+++ b/lib/libhac/include/nn/hac/MiscFlagsHandler.h
@@ -1,8 +1,10 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
-#include <nx/MiscFlagsEntry.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
+#include <nn/hac/MiscFlagsEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class MiscFlagsHandler :
 		public IKernelCapabilityHandler
@@ -51,5 +53,5 @@ namespace nx
 		bool mIsSet;
 		fnd::List<Flags> mFlags;
 	};
-
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/MiscParamsEntry.h b/lib/libhac/include/nn/hac/MiscParamsEntry.h
index 04b5cc0..0925d16 100644
--- a/lib/libhac/include/nn/hac/MiscParamsEntry.h
+++ b/lib/libhac/include/nn/hac/MiscParamsEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class MiscParamsEntry
 	{
@@ -44,6 +46,5 @@ namespace nx
 			mProgramType = field & kMaxProgramType;
 		}
 	};
-
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/MiscParamsHandler.h b/lib/libhac/include/nn/hac/MiscParamsHandler.h
index b88b522..063a22c 100644
--- a/lib/libhac/include/nn/hac/MiscParamsHandler.h
+++ b/lib/libhac/include/nn/hac/MiscParamsHandler.h
@@ -1,8 +1,10 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
-#include <nx/MiscParamsEntry.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
+#include <nn/hac/MiscParamsEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class MiscParamsHandler :
 		public IKernelCapabilityHandler
@@ -32,4 +34,4 @@ namespace nx
 		MiscParamsEntry mEntry;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/NcaHeader.h b/lib/libhac/include/nn/hac/NcaHeader.h
index 6a2f1fe..f08ed53 100644
--- a/lib/libhac/include/nn/hac/NcaHeader.h
+++ b/lib/libhac/include/nn/hac/NcaHeader.h
@@ -1,9 +1,11 @@
 #pragma once
-#include <nx/nca.h>
+#include <nn/hac/nca.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class NcaHeader : 
 		public fnd::ISerialisable
@@ -112,5 +114,5 @@ namespace nx
 		uint64_t blockNumToSize(uint32_t block_num) const;
 		uint32_t sizeToBlockNum(uint64_t real_size) const;
 	};
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/NcaUtils.h b/lib/libhac/include/nn/hac/NcaUtils.h
index 50365b4..b3b14a6 100644
--- a/lib/libhac/include/nn/hac/NcaUtils.h
+++ b/lib/libhac/include/nn/hac/NcaUtils.h
@@ -1,14 +1,17 @@
 #pragma once
-#include <nx/nca.h>
+#include <nn/hac/nca.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class NcaUtils
 	{
 	public:
-		static inline size_t sectorToOffset(size_t sector_index) { return sector_index * nx::nca::kSectorSize; }
+		static inline size_t sectorToOffset(size_t sector_index) { return sector_index * nn::hac::nca::kSectorSize; }
 		static void decryptNcaHeader(const byte_t* src, byte_t* dst, const crypto::aes::sAesXts128Key& key);
 		static byte_t getMasterKeyRevisionFromKeyGeneration(byte_t key_generation);
-		static void getNcaPartitionAesCtr(const nx::sNcaFsHeader* hdr, byte_t* ctr);
+		static void getNcaPartitionAesCtr(const nn::hac::sNcaFsHeader* hdr, byte_t* ctr);
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/NpdmBinary.h b/lib/libhac/include/nn/hac/NpdmBinary.h
index c64f2d8..24d16e0 100644
--- a/lib/libhac/include/nn/hac/NpdmBinary.h
+++ b/lib/libhac/include/nn/hac/NpdmBinary.h
@@ -2,12 +2,13 @@
 #include <string>
 #include <fnd/List.h>
 #include <fnd/ISerialisable.h>
-#include <nx/npdm.h>
-#include <nx/AccessControlInfoBinary.h>
-#include <nx/AccessControlInfoDescBinary.h>
+#include <nn/hac/npdm.h>
+#include <nn/hac/AccessControlInfoBinary.h>
+#include <nn/hac/AccessControlInfoDescBinary.h>
 
-
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class NpdmBinary :
 		public fnd::ISerialisable
@@ -75,5 +76,5 @@ namespace nx
 		AccessControlInfoBinary mAci;
 		AccessControlInfoDescBinary mAcid;
 	};
-
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/NroHeader.h b/lib/libhac/include/nn/hac/NroHeader.h
index cb1dc95..840563a 100644
--- a/lib/libhac/include/nn/hac/NroHeader.h
+++ b/lib/libhac/include/nn/hac/NroHeader.h
@@ -1,9 +1,11 @@
 #pragma once
-#include <nx/nro.h>
+#include <nn/hac/nro.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class NroHeader : 
 		public fnd::ISerialisable
@@ -134,5 +136,5 @@ namespace nx
 		sSection mRoDynStrInfo;
 		sSection mRoDynSymInfo;
 	};
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/NsoHeader.h b/lib/libhac/include/nn/hac/NsoHeader.h
index cd65fde..1593c7e 100644
--- a/lib/libhac/include/nn/hac/NsoHeader.h
+++ b/lib/libhac/include/nn/hac/NsoHeader.h
@@ -1,9 +1,11 @@
 #pragma once
-#include <nx/nso.h>
+#include <nn/hac/nso.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class NsoHeader : 
 		public fnd::ISerialisable
@@ -142,5 +144,5 @@ namespace nx
 		sLayout mRoDynStrInfo;
 		sLayout mRoDynSymInfo;
 	};
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/PfsHeader.h b/lib/libhac/include/nn/hac/PfsHeader.h
index 2c5ed37..4eab512 100644
--- a/lib/libhac/include/nn/hac/PfsHeader.h
+++ b/lib/libhac/include/nn/hac/PfsHeader.h
@@ -3,10 +3,11 @@
 #include <fnd/types.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
-#include <nx/pfs.h>
+#include <nn/hac/pfs.h>
 
-
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class PfsHeader :
 		public fnd::ISerialisable
@@ -99,4 +100,4 @@ namespace nx
 		void calculateOffsets(size_t data_offset);
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h b/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h
index 3066e5f..8c63d9c 100644
--- a/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h
+++ b/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h
@@ -3,9 +3,11 @@
 #include <vector>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
-#include <nx/ServiceAccessControlEntry.h>
+#include <nn/hac/ServiceAccessControlEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class ServiceAccessControlBinary :
 		public fnd::ISerialisable
@@ -36,5 +38,5 @@ namespace nx
 		// variables
 		fnd::List<ServiceAccessControlEntry> mServices;
 	};
-
+}
 }
diff --git a/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h b/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h
index 71a6587..cfd999b 100644
--- a/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h
+++ b/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h
@@ -3,7 +3,9 @@
 #include <fnd/types.h>
 #include <fnd/ISerialisable.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class ServiceAccessControlEntry : 
 		public fnd::ISerialisable
@@ -48,4 +50,5 @@ namespace nx
 		bool isEqual(const ServiceAccessControlEntry& other) const;
 		void copyFrom(const ServiceAccessControlEntry& other);
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/SystemCallEntry.h b/lib/libhac/include/nn/hac/SystemCallEntry.h
index 1a1ca64..3eb0b0a 100644
--- a/lib/libhac/include/nn/hac/SystemCallEntry.h
+++ b/lib/libhac/include/nn/hac/SystemCallEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class SystemCallEntry
 	{
@@ -54,4 +56,4 @@ namespace nx
 		}
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/SystemCallHandler.h b/lib/libhac/include/nn/hac/SystemCallHandler.h
index 35ac45a..d726d7c 100644
--- a/lib/libhac/include/nn/hac/SystemCallHandler.h
+++ b/lib/libhac/include/nn/hac/SystemCallHandler.h
@@ -1,7 +1,9 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class SystemCallHandler :
 		public IKernelCapabilityHandler
@@ -32,5 +34,5 @@ namespace nx
 		bool mIsSet;
 		fnd::List<uint8_t> mSystemCalls;
 	};
-
+}
 }
diff --git a/lib/libhac/include/nn/hac/ThreadInfoEntry.h b/lib/libhac/include/nn/hac/ThreadInfoEntry.h
index ff0e062..07a3e93 100644
--- a/lib/libhac/include/nn/hac/ThreadInfoEntry.h
+++ b/lib/libhac/include/nn/hac/ThreadInfoEntry.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <string>
 #include <fnd/types.h>
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class ThreadInfoEntry
 	{
@@ -64,3 +66,4 @@ namespace nx
 		}
 	};
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/ThreadInfoHandler.h b/lib/libhac/include/nn/hac/ThreadInfoHandler.h
index d2fd01c..f7301f6 100644
--- a/lib/libhac/include/nn/hac/ThreadInfoHandler.h
+++ b/lib/libhac/include/nn/hac/ThreadInfoHandler.h
@@ -1,8 +1,10 @@
 #pragma once
-#include <nx/IKernelCapabilityHandler.h>
-#include <nx/ThreadInfoEntry.h>
+#include <nn/hac/IKernelCapabilityHandler.h>
+#include <nn/hac/ThreadInfoEntry.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class ThreadInfoHandler :
 		public IKernelCapabilityHandler
@@ -38,4 +40,4 @@ namespace nx
 		ThreadInfoEntry mEntry;
 	};
 }
-
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/XciHeader.h b/lib/libhac/include/nn/hac/XciHeader.h
index bbbf2cd..89ff730 100644
--- a/lib/libhac/include/nn/hac/XciHeader.h
+++ b/lib/libhac/include/nn/hac/XciHeader.h
@@ -1,9 +1,11 @@
 #pragma once
-#include <nx/xci.h>
+#include <nn/hac/xci.h>
 #include <fnd/ISerialisable.h>
 #include <fnd/List.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class XciHeader : 
 		public fnd::ISerialisable
@@ -121,5 +123,5 @@ namespace nx
 		byte_t mUppHash[8];
 		uint64_t mUppId;
 	};
-
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/XciUtils.h b/lib/libhac/include/nn/hac/XciUtils.h
index 0482bb1..7ba7eaa 100644
--- a/lib/libhac/include/nn/hac/XciUtils.h
+++ b/lib/libhac/include/nn/hac/XciUtils.h
@@ -1,13 +1,16 @@
 #pragma once
-#include <nx/xci.h>
+#include <nn/hac/xci.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	class XciUtils
 	{
 	public:
 		static inline uint64_t blockToAddr(uint32_t block) { return ((uint64_t)block) << 9; }
-		static void getXciHeaderAesIv(const nx::sXciHeader* hdr, byte_t* iv);
+		static void getXciHeaderAesIv(const nn::hac::sXciHeader* hdr, byte_t* iv);
 		static void decryptXciHeader(const byte_t* src, byte_t* dst, const byte_t* key);
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/aci.h b/lib/libhac/include/nn/hac/aci.h
index b2755e5..e426469 100644
--- a/lib/libhac/include/nn/hac/aci.h
+++ b/lib/libhac/include/nn/hac/aci.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <fnd/types.h>
 #include <crypto/rsa.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace aci
 	{
@@ -50,4 +52,5 @@ namespace nx
 		sAciSection kc;
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/cnmt.h b/lib/libhac/include/nn/hac/cnmt.h
index 10d972c..ededd0b 100644
--- a/lib/libhac/include/nn/hac/cnmt.h
+++ b/lib/libhac/include/nn/hac/cnmt.h
@@ -2,7 +2,9 @@
 #include <fnd/types.h>
 #include <crypto/sha.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace cnmt
 	{
@@ -132,4 +134,5 @@ namespace nx
 		byte_t data[cnmt::kDigestLen];
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/elf.h b/lib/libhac/include/nn/hac/elf.h
index 00356d6..2083238 100644
--- a/lib/libhac/include/nn/hac/elf.h
+++ b/lib/libhac/include/nn/hac/elf.h
@@ -1,7 +1,9 @@
 #pragma once
 #include <fnd/types.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace elf
 	{
@@ -64,4 +66,5 @@ namespace nx
 		le_uint64_t size;
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/fac.h b/lib/libhac/include/nn/hac/fac.h
index 7707353..1b1714e 100644
--- a/lib/libhac/include/nn/hac/fac.h
+++ b/lib/libhac/include/nn/hac/fac.h
@@ -1,7 +1,9 @@
 #pragma once
 #include <fnd/types.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace fac
 	{
@@ -54,4 +56,5 @@ namespace nx
 		} content_owner_ids, save_data_owner_ids; // the data for these follow later in binary. start/end relative to base of FacData instance
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/hierarchicalintegrity.h b/lib/libhac/include/nn/hac/hierarchicalintegrity.h
index 4c16d0d..e662ee2 100644
--- a/lib/libhac/include/nn/hac/hierarchicalintegrity.h
+++ b/lib/libhac/include/nn/hac/hierarchicalintegrity.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <fnd/types.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace hierarchicalintegrity
 	{
@@ -30,3 +32,4 @@ namespace nx
 	};
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/hierarchicalsha256.h b/lib/libhac/include/nn/hac/hierarchicalsha256.h
index 5b78c66..e392c8c 100644
--- a/lib/libhac/include/nn/hac/hierarchicalsha256.h
+++ b/lib/libhac/include/nn/hac/hierarchicalsha256.h
@@ -2,7 +2,9 @@
 #include <fnd/types.h>
 #include <crypto/sha.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace hierarchicalsha256
 	{
@@ -24,3 +26,4 @@ namespace nx
 	};
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/kc.h b/lib/libhac/include/nn/hac/kc.h
index 192c6de..e4f5949 100644
--- a/lib/libhac/include/nn/hac/kc.h
+++ b/lib/libhac/include/nn/hac/kc.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <fnd/types.h>
 #include <crypto/rsa.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace kc
 	{
@@ -21,4 +23,5 @@ namespace nx
 			KC_MISC_FLAGS = 16
 		};
 	}
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/nacp.h b/lib/libhac/include/nn/hac/nacp.h
index bbb7019..61de162 100644
--- a/lib/libhac/include/nn/hac/nacp.h
+++ b/lib/libhac/include/nn/hac/nacp.h
@@ -1,7 +1,9 @@
 #pragma once
 #include <fnd/types.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace nacp
 	{
@@ -217,4 +219,5 @@ namespace nx
 		byte_t reserved_04[0xDED];
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/nca.h b/lib/libhac/include/nn/hac/nca.h
index e49e4a4..3a3207c 100644
--- a/lib/libhac/include/nn/hac/nca.h
+++ b/lib/libhac/include/nn/hac/nca.h
@@ -3,9 +3,11 @@
 #include <crypto/aes.h>
 #include <crypto/sha.h>
 #include <crypto/rsa.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace nca
 	{
@@ -127,8 +129,9 @@ namespace nx
 		byte_t signature_main[crypto::rsa::kRsa2048Size];
 		byte_t signature_acid[crypto::rsa::kRsa2048Size];
 		sNcaHeader header;
-		sNcaFsHeader fs_header[nx::nca::kPartitionNum];
+		sNcaFsHeader fs_header[nn::hac::nca::kPartitionNum];
 	};
 
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/npdm.h b/lib/libhac/include/nn/hac/npdm.h
index b508ba8..dbcda23 100644
--- a/lib/libhac/include/nn/hac/npdm.h
+++ b/lib/libhac/include/nn/hac/npdm.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <fnd/types.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace npdm
 	{
@@ -51,4 +53,5 @@ namespace nx
 	};
 
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/nro.h b/lib/libhac/include/nn/hac/nro.h
index c145e64..e46b316 100644
--- a/lib/libhac/include/nn/hac/nro.h
+++ b/lib/libhac/include/nn/hac/nro.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <fnd/types.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace nro
 	{
@@ -40,3 +42,4 @@ namespace nx
 	};
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/nrr.h b/lib/libhac/include/nn/hac/nrr.h
index 3931ad1..eae5180 100644
--- a/lib/libhac/include/nn/hac/nrr.h
+++ b/lib/libhac/include/nn/hac/nrr.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <fnd/types.h>
 #include <crypto/rsa.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace nrr
 	{
@@ -34,3 +36,4 @@ namespace nx
 	};
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/nso.h b/lib/libhac/include/nn/hac/nso.h
index d40c925..4223b37 100644
--- a/lib/libhac/include/nn/hac/nso.h
+++ b/lib/libhac/include/nn/hac/nso.h
@@ -1,9 +1,11 @@
 #pragma once
 #include <fnd/types.h>
 #include <crypto/sha.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace nso
 	{
@@ -63,3 +65,4 @@ namespace nx
 
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/pfs.h b/lib/libhac/include/nn/hac/pfs.h
index 9b1fde1..18f4e5c 100644
--- a/lib/libhac/include/nn/hac/pfs.h
+++ b/lib/libhac/include/nn/hac/pfs.h
@@ -1,8 +1,10 @@
 #include <fnd/types.h>
 #include <crypto/sha.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace pfs
 	{
@@ -39,3 +41,4 @@ namespace nx
 	}; // sizeof(0x40)
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/romfs.h b/lib/libhac/include/nn/hac/romfs.h
index 1756425..73d376d 100644
--- a/lib/libhac/include/nn/hac/romfs.h
+++ b/lib/libhac/include/nn/hac/romfs.h
@@ -1,7 +1,9 @@
 #pragma once
 #include <fnd/types.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace romfs
 	{
@@ -55,3 +57,4 @@ namespace nx
 	};
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/include/nn/hac/xci.h b/lib/libhac/include/nn/hac/xci.h
index b7b0797..79be4d9 100644
--- a/lib/libhac/include/nn/hac/xci.h
+++ b/lib/libhac/include/nn/hac/xci.h
@@ -4,9 +4,11 @@
 #include <crypto/aes.h>
 #include <crypto/sha.h>
 #include <crypto/rsa.h>
-#include <nx/macro.h>
+#include <nn/hac/macro.h>
 
-namespace nx
+namespace nn
+{
+namespace hac
 {
 	namespace xci
 	{
@@ -128,3 +130,4 @@ namespace nx
 
 #pragma pack(pop)
 }
+}
\ No newline at end of file
diff --git a/lib/libhac/source/AccessControlInfoBinary.cpp b/lib/libhac/source/AccessControlInfoBinary.cpp
index 6c31f74..cdf5a50 100644
--- a/lib/libhac/source/AccessControlInfoBinary.cpp
+++ b/lib/libhac/source/AccessControlInfoBinary.cpp
@@ -1,16 +1,16 @@
-#include <nx/AccessControlInfoBinary.h>
+#include <nn/hac/AccessControlInfoBinary.h>
 
-nx::AccessControlInfoBinary::AccessControlInfoBinary()
+nn::hac::AccessControlInfoBinary::AccessControlInfoBinary()
 {
 	clear();
 }
 
-nx::AccessControlInfoBinary::AccessControlInfoBinary(const AccessControlInfoBinary & other)
+nn::hac::AccessControlInfoBinary::AccessControlInfoBinary(const AccessControlInfoBinary & other)
 {
 	*this = other;
 }
 
-void nx::AccessControlInfoBinary::operator=(const AccessControlInfoBinary & other)
+void nn::hac::AccessControlInfoBinary::operator=(const AccessControlInfoBinary & other)
 {
 	mRawBinary = other.mRawBinary;
 	mProgramId = other.mProgramId;
@@ -19,7 +19,7 @@ void nx::AccessControlInfoBinary::operator=(const AccessControlInfoBinary & othe
 	mKernelCapabilities = other.mKernelCapabilities;
 }
 
-bool nx::AccessControlInfoBinary::operator==(const AccessControlInfoBinary & other) const
+bool nn::hac::AccessControlInfoBinary::operator==(const AccessControlInfoBinary & other) const
 {
 	return (mProgramId == other.mProgramId) \
 		&& (mFileSystemAccessControl == other.mFileSystemAccessControl) \
@@ -27,12 +27,12 @@ bool nx::AccessControlInfoBinary::operator==(const AccessControlInfoBinary & oth
 		&& (mKernelCapabilities == other.mKernelCapabilities);
 }
 
-bool nx::AccessControlInfoBinary::operator!=(const AccessControlInfoBinary & other) const
+bool nn::hac::AccessControlInfoBinary::operator!=(const AccessControlInfoBinary & other) const
 {
 	return !(*this == other);
 }
 
-void nx::AccessControlInfoBinary::toBytes()
+void nn::hac::AccessControlInfoBinary::toBytes()
 {
 	if (mFileSystemAccessControl.getBytes().size() == 0)
 		mFileSystemAccessControl.toBytes();
@@ -76,7 +76,7 @@ void nx::AccessControlInfoBinary::toBytes()
 	hdr->kc.size = kc.size;
 }
 
-void nx::AccessControlInfoBinary::fromBytes(const byte_t* data, size_t len)
+void nn::hac::AccessControlInfoBinary::fromBytes(const byte_t* data, size_t len)
 {
 	// check size
 	if (len < sizeof(sAciHeader))
@@ -117,12 +117,12 @@ void nx::AccessControlInfoBinary::fromBytes(const byte_t* data, size_t len)
 	mKernelCapabilities.fromBytes(mRawBinary.data() + hdr.kc.offset.get(), hdr.kc.size.get());
 }
 
-const fnd::Vec<byte_t>& nx::AccessControlInfoBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::AccessControlInfoBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::AccessControlInfoBinary::clear()
+void nn::hac::AccessControlInfoBinary::clear()
 {
 	mRawBinary.clear();
 	mProgramId = 0;
@@ -131,42 +131,42 @@ void nx::AccessControlInfoBinary::clear()
 	mKernelCapabilities.clear();
 }
 
-uint64_t nx::AccessControlInfoBinary::getProgramId() const
+uint64_t nn::hac::AccessControlInfoBinary::getProgramId() const
 {
 	return mProgramId;
 }
 
-void nx::AccessControlInfoBinary::setProgramId(uint64_t program_id)
+void nn::hac::AccessControlInfoBinary::setProgramId(uint64_t program_id)
 {
 	mProgramId = program_id;
 }
 
-const nx::FileSystemAccessControlBinary& nx::AccessControlInfoBinary::getFileSystemAccessControl() const
+const nn::hac::FileSystemAccessControlBinary& nn::hac::AccessControlInfoBinary::getFileSystemAccessControl() const
 {
 	return mFileSystemAccessControl;
 }
 
-void nx::AccessControlInfoBinary::setFileSystemAccessControl(const nx::FileSystemAccessControlBinary& fac)
+void nn::hac::AccessControlInfoBinary::setFileSystemAccessControl(const nn::hac::FileSystemAccessControlBinary& fac)
 {
 	mFileSystemAccessControl = fac;
 }
 
-const nx::ServiceAccessControlBinary& nx::AccessControlInfoBinary::getServiceAccessControl() const
+const nn::hac::ServiceAccessControlBinary& nn::hac::AccessControlInfoBinary::getServiceAccessControl() const
 {
 	return mServiceAccessControl;
 }
 
-void nx::AccessControlInfoBinary::setServiceAccessControl(const nx::ServiceAccessControlBinary& sac)
+void nn::hac::AccessControlInfoBinary::setServiceAccessControl(const nn::hac::ServiceAccessControlBinary& sac)
 {
 	mServiceAccessControl = sac;
 }
 
-const nx::KernelCapabilityBinary& nx::AccessControlInfoBinary::getKernelCapabilities() const
+const nn::hac::KernelCapabilityBinary& nn::hac::AccessControlInfoBinary::getKernelCapabilities() const
 {
 	return mKernelCapabilities;
 }
 
-void nx::AccessControlInfoBinary::setKernelCapabilities(const nx::KernelCapabilityBinary& kc)
+void nn::hac::AccessControlInfoBinary::setKernelCapabilities(const nn::hac::KernelCapabilityBinary& kc)
 {
 	mKernelCapabilities = kc;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/AccessControlInfoDescBinary.cpp b/lib/libhac/source/AccessControlInfoDescBinary.cpp
index a351f0b..d7c24d4 100644
--- a/lib/libhac/source/AccessControlInfoDescBinary.cpp
+++ b/lib/libhac/source/AccessControlInfoDescBinary.cpp
@@ -1,16 +1,16 @@
-#include <nx/AccessControlInfoDescBinary.h>
+#include <nn/hac/AccessControlInfoDescBinary.h>
 
-nx::AccessControlInfoDescBinary::AccessControlInfoDescBinary()
+nn::hac::AccessControlInfoDescBinary::AccessControlInfoDescBinary()
 {
 	clear();
 }
 
-nx::AccessControlInfoDescBinary::AccessControlInfoDescBinary(const AccessControlInfoDescBinary & other)
+nn::hac::AccessControlInfoDescBinary::AccessControlInfoDescBinary(const AccessControlInfoDescBinary & other)
 {
 	*this = other;
 }
 
-void nx::AccessControlInfoDescBinary::operator=(const AccessControlInfoDescBinary & other)
+void nn::hac::AccessControlInfoDescBinary::operator=(const AccessControlInfoDescBinary & other)
 {
 	mRawBinary = other.mRawBinary;
 	mNcaHeaderSignature2Key = other.mNcaHeaderSignature2Key;
@@ -21,7 +21,7 @@ void nx::AccessControlInfoDescBinary::operator=(const AccessControlInfoDescBinar
 	mKernelCapabilities = other.mKernelCapabilities;
 }
 
-bool nx::AccessControlInfoDescBinary::operator==(const AccessControlInfoDescBinary & other) const
+bool nn::hac::AccessControlInfoDescBinary::operator==(const AccessControlInfoDescBinary & other) const
 {
 	return (mNcaHeaderSignature2Key == other.mNcaHeaderSignature2Key) \
 		&& (mFlags == other.mFlags) \
@@ -31,12 +31,12 @@ bool nx::AccessControlInfoDescBinary::operator==(const AccessControlInfoDescBina
 		&& (mKernelCapabilities == other.mKernelCapabilities);
 }
 
-bool nx::AccessControlInfoDescBinary::operator!=(const AccessControlInfoDescBinary & other) const
+bool nn::hac::AccessControlInfoDescBinary::operator!=(const AccessControlInfoDescBinary & other) const
 {
 	return !(*this == other);
 }
 
-void nx::AccessControlInfoDescBinary::toBytes()
+void nn::hac::AccessControlInfoDescBinary::toBytes()
 {
 	if (mFileSystemAccessControl.getBytes().size() == 0)
 		mFileSystemAccessControl.toBytes();
@@ -93,7 +93,7 @@ void nx::AccessControlInfoDescBinary::toBytes()
 	hdr->kc.size = kc.size;
 }
 
-void nx::AccessControlInfoDescBinary::fromBytes(const byte_t* data, size_t len)
+void nn::hac::AccessControlInfoDescBinary::fromBytes(const byte_t* data, size_t len)
 {
 	// check size
 	if (len < sizeof(sAciDescHeader))
@@ -144,12 +144,12 @@ void nx::AccessControlInfoDescBinary::fromBytes(const byte_t* data, size_t len)
 	mKernelCapabilities.fromBytes(mRawBinary.data() + hdr.kc.offset.get(), hdr.kc.size.get());
 }
 
-const fnd::Vec<byte_t>& nx::AccessControlInfoDescBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::AccessControlInfoDescBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::AccessControlInfoDescBinary::generateSignature(const crypto::rsa::sRsa2048Key& key)
+void nn::hac::AccessControlInfoDescBinary::generateSignature(const crypto::rsa::sRsa2048Key& key)
 {
 	if (mRawBinary.size() == 0)
 		toBytes();
@@ -163,7 +163,7 @@ void nx::AccessControlInfoDescBinary::generateSignature(const crypto::rsa::sRsa2
 	}
 }
 
-void nx::AccessControlInfoDescBinary::validateSignature(const crypto::rsa::sRsa2048Key& key) const
+void nn::hac::AccessControlInfoDescBinary::validateSignature(const crypto::rsa::sRsa2048Key& key) const
 {
 	if (mRawBinary.size() == 0)
 		throw fnd::Exception(kModuleName, "No Access Control Info Desc binary exists to verify");
@@ -177,7 +177,7 @@ void nx::AccessControlInfoDescBinary::validateSignature(const crypto::rsa::sRsa2
 	}
 }
 
-void nx::AccessControlInfoDescBinary::clear()
+void nn::hac::AccessControlInfoDescBinary::clear()
 {
 	mRawBinary.clear();
 	memset((void*)&mNcaHeaderSignature2Key, 0, sizeof(mNcaHeaderSignature2Key));
@@ -189,62 +189,62 @@ void nx::AccessControlInfoDescBinary::clear()
 	mKernelCapabilities.clear();
 }
 
-const crypto::rsa::sRsa2048Key& nx::AccessControlInfoDescBinary::getNcaHeaderSignature2Key() const
+const crypto::rsa::sRsa2048Key& nn::hac::AccessControlInfoDescBinary::getNcaHeaderSignature2Key() const
 {
 	return mNcaHeaderSignature2Key;
 }
 
-void nx::AccessControlInfoDescBinary::setNcaHeaderSignature2Key(const crypto::rsa::sRsa2048Key& key)
+void nn::hac::AccessControlInfoDescBinary::setNcaHeaderSignature2Key(const crypto::rsa::sRsa2048Key& key)
 {
 	mNcaHeaderSignature2Key = key;
 }
 
-const fnd::List<nx::aci::Flag>& nx::AccessControlInfoDescBinary::getFlagList() const
+const fnd::List<nn::hac::aci::Flag>& nn::hac::AccessControlInfoDescBinary::getFlagList() const
 {
 	return mFlags;
 }
 
-void nx::AccessControlInfoDescBinary::setFlagList(const fnd::List<nx::aci::Flag>& flags)
+void nn::hac::AccessControlInfoDescBinary::setFlagList(const fnd::List<nn::hac::aci::Flag>& flags)
 {
 	mFlags = flags;
 }
 
-const nx::AccessControlInfoDescBinary::sProgramIdRestrict&  nx::AccessControlInfoDescBinary::getProgramIdRestrict() const
+const nn::hac::AccessControlInfoDescBinary::sProgramIdRestrict&  nn::hac::AccessControlInfoDescBinary::getProgramIdRestrict() const
 {
 	return mProgramIdRestrict;
 }
 
-void nx::AccessControlInfoDescBinary::setProgramIdRestrict(const sProgramIdRestrict& pid_restrict)
+void nn::hac::AccessControlInfoDescBinary::setProgramIdRestrict(const sProgramIdRestrict& pid_restrict)
 {
 	mProgramIdRestrict = pid_restrict;
 }
 
-const nx::FileSystemAccessControlBinary& nx::AccessControlInfoDescBinary::getFileSystemAccessControl() const
+const nn::hac::FileSystemAccessControlBinary& nn::hac::AccessControlInfoDescBinary::getFileSystemAccessControl() const
 {
 	return mFileSystemAccessControl;
 }
 
-void nx::AccessControlInfoDescBinary::setFileSystemAccessControl(const nx::FileSystemAccessControlBinary& fac)
+void nn::hac::AccessControlInfoDescBinary::setFileSystemAccessControl(const nn::hac::FileSystemAccessControlBinary& fac)
 {
 	mFileSystemAccessControl = fac;
 }
 
-const nx::ServiceAccessControlBinary& nx::AccessControlInfoDescBinary::getServiceAccessControl() const
+const nn::hac::ServiceAccessControlBinary& nn::hac::AccessControlInfoDescBinary::getServiceAccessControl() const
 {
 	return mServiceAccessControl;
 }
 
-void nx::AccessControlInfoDescBinary::setServiceAccessControl(const nx::ServiceAccessControlBinary& sac)
+void nn::hac::AccessControlInfoDescBinary::setServiceAccessControl(const nn::hac::ServiceAccessControlBinary& sac)
 {
 	mServiceAccessControl = sac;
 }
 
-const nx::KernelCapabilityBinary& nx::AccessControlInfoDescBinary::getKernelCapabilities() const
+const nn::hac::KernelCapabilityBinary& nn::hac::AccessControlInfoDescBinary::getKernelCapabilities() const
 {
 	return mKernelCapabilities;
 }
 
-void nx::AccessControlInfoDescBinary::setKernelCapabilities(const nx::KernelCapabilityBinary& kc)
+void nn::hac::AccessControlInfoDescBinary::setKernelCapabilities(const nn::hac::KernelCapabilityBinary& kc)
 {
 	mKernelCapabilities = kc;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/AesKeygen.cpp b/lib/libhac/source/AesKeygen.cpp
index 804c3c6..7233394 100644
--- a/lib/libhac/source/AesKeygen.cpp
+++ b/lib/libhac/source/AesKeygen.cpp
@@ -1,17 +1,17 @@
-#include <nx/AesKeygen.h>
+#include <nn/hac/AesKeygen.h>
 
-void nx::AesKeygen::generateKey(byte_t* dst, const byte_t* src, const byte_t* src_key)
+void nn::hac::AesKeygen::generateKey(byte_t* dst, const byte_t* src, const byte_t* src_key)
 {
 	crypto::aes::AesEcbDecrypt(src, sizeof(crypto::aes::sAes128Key), src_key, dst);
 }
 
-void nx::AesKeygen::generateKey(byte_t* dst, const byte_t* src1, const byte_t* src2, const byte_t* src1_key)
+void nn::hac::AesKeygen::generateKey(byte_t* dst, const byte_t* src1, const byte_t* src2, const byte_t* src1_key)
 {
 	crypto::aes::sAes128Key src2_key;
 	generateKey(src2_key.key, src1, src1_key);
 	generateKey(dst, src2, src2_key.key);
 }
-void nx::AesKeygen::generateKey(byte_t* dst, const byte_t* src1, const byte_t* src2, const byte_t* src3, const byte_t* src1_key)
+void nn::hac::AesKeygen::generateKey(byte_t* dst, const byte_t* src1, const byte_t* src2, const byte_t* src3, const byte_t* src1_key)
 {
 	crypto::aes::sAes128Key src3_key;
 	generateKey(src3_key.key, src1, src2, src1_key);
diff --git a/lib/libhac/source/ApplicationControlPropertyBinary.cpp b/lib/libhac/source/ApplicationControlPropertyBinary.cpp
index a6ca675..14f9125 100644
--- a/lib/libhac/source/ApplicationControlPropertyBinary.cpp
+++ b/lib/libhac/source/ApplicationControlPropertyBinary.cpp
@@ -1,16 +1,16 @@
-#include <nx/ApplicationControlPropertyBinary.h>
+#include <nn/hac/ApplicationControlPropertyBinary.h>
 
-nx::ApplicationControlPropertyBinary::ApplicationControlPropertyBinary()
+nn::hac::ApplicationControlPropertyBinary::ApplicationControlPropertyBinary()
 {
 	clear();
 }
 
-nx::ApplicationControlPropertyBinary::ApplicationControlPropertyBinary(const ApplicationControlPropertyBinary& other)
+nn::hac::ApplicationControlPropertyBinary::ApplicationControlPropertyBinary(const ApplicationControlPropertyBinary& other)
 {
 	*this = other;
 }
 
-void nx::ApplicationControlPropertyBinary::operator=(const ApplicationControlPropertyBinary& other)
+void nn::hac::ApplicationControlPropertyBinary::operator=(const ApplicationControlPropertyBinary& other)
 {
 	clear();
 	mTitle = other.mTitle;
@@ -54,7 +54,7 @@ void nx::ApplicationControlPropertyBinary::operator=(const ApplicationControlPro
 	mProgramIndex = other.mProgramIndex;
 }
 
-bool nx::ApplicationControlPropertyBinary::operator==(const ApplicationControlPropertyBinary& other) const
+bool nn::hac::ApplicationControlPropertyBinary::operator==(const ApplicationControlPropertyBinary& other) const
 {
 	return (mTitle == other.mTitle) \
 		&& (mIsbn == other.mIsbn) \
@@ -97,14 +97,14 @@ bool nx::ApplicationControlPropertyBinary::operator==(const ApplicationControlPr
 		&& (mProgramIndex == other.mProgramIndex);
 }
 
-bool nx::ApplicationControlPropertyBinary::operator!=(const ApplicationControlPropertyBinary& other) const
+bool nn::hac::ApplicationControlPropertyBinary::operator!=(const ApplicationControlPropertyBinary& other) const
 {
 	return !(*this == other);
 }
 
-void nx::ApplicationControlPropertyBinary::toBytes()
+void nn::hac::ApplicationControlPropertyBinary::toBytes()
 {
-	mRawBinary.alloc(sizeof(nx::sApplicationControlProperty));
+	mRawBinary.alloc(sizeof(nn::hac::sApplicationControlProperty));
 
 	sApplicationControlProperty* data = (sApplicationControlProperty*)mRawBinary.data();
 
@@ -182,16 +182,16 @@ void nx::ApplicationControlPropertyBinary::toBytes()
 	data->cache_storage_data_and_journal_size_max = mCacheStorageDataAndJournalSizeMax;
 }
 
-void nx::ApplicationControlPropertyBinary::fromBytes(const byte_t* bytes, size_t len)
+void nn::hac::ApplicationControlPropertyBinary::fromBytes(const byte_t* bytes, size_t len)
 {
-	if (len < sizeof(nx::sApplicationControlProperty))
+	if (len < sizeof(nn::hac::sApplicationControlProperty))
 	{
 		throw fnd::Exception(kModuleName, "NACP too small");
 	}
 
 	clear();
 
-	mRawBinary.alloc(sizeof(nx::sApplicationControlProperty));
+	mRawBinary.alloc(sizeof(nn::hac::sApplicationControlProperty));
 	memcpy(mRawBinary.data(), bytes, mRawBinary.size());
 
 	const sApplicationControlProperty* data = (const sApplicationControlProperty*)mRawBinary.data();
@@ -275,12 +275,12 @@ void nx::ApplicationControlPropertyBinary::fromBytes(const byte_t* bytes, size_t
 	mCacheStorageDataAndJournalSizeMax = (int64_t)data->cache_storage_data_and_journal_size_max.get();
 }
 
-const fnd::Vec<byte_t>& nx::ApplicationControlPropertyBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::ApplicationControlPropertyBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::ApplicationControlPropertyBinary::clear()
+void nn::hac::ApplicationControlPropertyBinary::clear()
 {
 	mRawBinary.clear();
 	mTitle.clear();
@@ -324,392 +324,392 @@ void nx::ApplicationControlPropertyBinary::clear()
 	mProgramIndex = 0;
 }
 
-const fnd::List<nx::ApplicationControlPropertyBinary::sTitle>& nx::ApplicationControlPropertyBinary::getTitle() const
+const fnd::List<nn::hac::ApplicationControlPropertyBinary::sTitle>& nn::hac::ApplicationControlPropertyBinary::getTitle() const
 {
 	return mTitle;
 }
 
-void nx::ApplicationControlPropertyBinary::setTitle(const fnd::List<sTitle>& title)
+void nn::hac::ApplicationControlPropertyBinary::setTitle(const fnd::List<sTitle>& title)
 {
 	mTitle = title;
 }
 
-const std::string& nx::ApplicationControlPropertyBinary::getIsbn() const
+const std::string& nn::hac::ApplicationControlPropertyBinary::getIsbn() const
 {
 	return mIsbn;
 }
 
-void nx::ApplicationControlPropertyBinary::setIsbn(const std::string& isbn)
+void nn::hac::ApplicationControlPropertyBinary::setIsbn(const std::string& isbn)
 {
 	mIsbn = isbn;
 }
 
-nx::nacp::StartupUserAccount nx::ApplicationControlPropertyBinary::getStartupUserAccount() const
+nn::hac::nacp::StartupUserAccount nn::hac::ApplicationControlPropertyBinary::getStartupUserAccount() const
 {
 	return mStartupUserAccount;
 }
 
-void nx::ApplicationControlPropertyBinary::setStartupUserAccount(nacp::StartupUserAccount var)
+void nn::hac::ApplicationControlPropertyBinary::setStartupUserAccount(nacp::StartupUserAccount var)
 {
 	mStartupUserAccount = var;
 }
 
-nx::nacp::TouchScreenUsageMode nx::ApplicationControlPropertyBinary::getTouchScreenUsageMode() const
+nn::hac::nacp::TouchScreenUsageMode nn::hac::ApplicationControlPropertyBinary::getTouchScreenUsageMode() const
 {
 	return mTouchScreenUsageMode;
 }
 
-void nx::ApplicationControlPropertyBinary::setTouchScreenUsageMode(nacp::TouchScreenUsageMode var)
+void nn::hac::ApplicationControlPropertyBinary::setTouchScreenUsageMode(nacp::TouchScreenUsageMode var)
 {
 	mTouchScreenUsageMode = var;
 }
 
-nx::nacp::AocRegistrationType nx::ApplicationControlPropertyBinary::getAocRegistrationType() const
+nn::hac::nacp::AocRegistrationType nn::hac::ApplicationControlPropertyBinary::getAocRegistrationType() const
 {
 	return mAocRegistrationType;
 }
 
-void nx::ApplicationControlPropertyBinary::setAocRegistrationType(nacp::AocRegistrationType var)
+void nn::hac::ApplicationControlPropertyBinary::setAocRegistrationType(nacp::AocRegistrationType var)
 {
 	mAocRegistrationType = var;
 }
 
-nx::nacp::AttributeFlag nx::ApplicationControlPropertyBinary::getAttributeFlag() const
+nn::hac::nacp::AttributeFlag nn::hac::ApplicationControlPropertyBinary::getAttributeFlag() const
 {
 	return mAttributeFlag;
 }
 
-void nx::ApplicationControlPropertyBinary::setAttributeFlag(nacp::AttributeFlag var)
+void nn::hac::ApplicationControlPropertyBinary::setAttributeFlag(nacp::AttributeFlag var)
 {
 	mAttributeFlag = var;
 }
 
-const fnd::List<nx::nacp::Language>& nx::ApplicationControlPropertyBinary::getSupportedLanguages() const
+const fnd::List<nn::hac::nacp::Language>& nn::hac::ApplicationControlPropertyBinary::getSupportedLanguages() const
 {
 	return mSupportedLanguages;
 }
 
-void nx::ApplicationControlPropertyBinary::setSupportedLanguages(const fnd::List<nacp::Language>& var)
+void nn::hac::ApplicationControlPropertyBinary::setSupportedLanguages(const fnd::List<nacp::Language>& var)
 {
 	mSupportedLanguages = var;
 }
 
-nx::nacp::ParentalControlFlag nx::ApplicationControlPropertyBinary::getParentalControlFlag() const
+nn::hac::nacp::ParentalControlFlag nn::hac::ApplicationControlPropertyBinary::getParentalControlFlag() const
 {
 	return mParentalControlFlag;
 }
 
-void nx::ApplicationControlPropertyBinary::setParentalControlFlag(nacp::ParentalControlFlag var)
+void nn::hac::ApplicationControlPropertyBinary::setParentalControlFlag(nacp::ParentalControlFlag var)
 {
 	mParentalControlFlag = var;
 }
 
-nx::nacp::ScreenshotMode nx::ApplicationControlPropertyBinary::getScreenshotMode() const
+nn::hac::nacp::ScreenshotMode nn::hac::ApplicationControlPropertyBinary::getScreenshotMode() const
 {
 	return mScreenshotMode;
 }
 
-void nx::ApplicationControlPropertyBinary::setScreenshotMode(nacp::ScreenshotMode var)
+void nn::hac::ApplicationControlPropertyBinary::setScreenshotMode(nacp::ScreenshotMode var)
 {
 	mScreenshotMode = var;
 }
 
-nx::nacp::VideoCaptureMode nx::ApplicationControlPropertyBinary::getVideoCaptureMode() const
+nn::hac::nacp::VideoCaptureMode nn::hac::ApplicationControlPropertyBinary::getVideoCaptureMode() const
 {
 	return mVideoCaptureMode;
 }
 
-void nx::ApplicationControlPropertyBinary::setVideoCaptureMode(nacp::VideoCaptureMode var)
+void nn::hac::ApplicationControlPropertyBinary::setVideoCaptureMode(nacp::VideoCaptureMode var)
 {
 	mVideoCaptureMode = var;
 }
 
-nx::nacp::DataLossConfirmation nx::ApplicationControlPropertyBinary::getDataLossConfirmation() const
+nn::hac::nacp::DataLossConfirmation nn::hac::ApplicationControlPropertyBinary::getDataLossConfirmation() const
 {
 	return mDataLossConfirmation;
 }
 
-void nx::ApplicationControlPropertyBinary::setDataLossConfirmation(nacp::DataLossConfirmation var)
+void nn::hac::ApplicationControlPropertyBinary::setDataLossConfirmation(nacp::DataLossConfirmation var)
 {
 	mDataLossConfirmation = var;
 }
 
-nx::nacp::PlayLogPolicy nx::ApplicationControlPropertyBinary::getPlayLogPolicy() const
+nn::hac::nacp::PlayLogPolicy nn::hac::ApplicationControlPropertyBinary::getPlayLogPolicy() const
 {
 	return mPlayLogPolicy;
 }
 
-void nx::ApplicationControlPropertyBinary::setPlayLogPolicy(nacp::PlayLogPolicy var)
+void nn::hac::ApplicationControlPropertyBinary::setPlayLogPolicy(nacp::PlayLogPolicy var)
 {
 	mPlayLogPolicy = var;
 }
 
-uint64_t nx::ApplicationControlPropertyBinary::getPresenceGroupId() const
+uint64_t nn::hac::ApplicationControlPropertyBinary::getPresenceGroupId() const
 {
 	return mPresenceGroupId;
 }
 
-void nx::ApplicationControlPropertyBinary::setPresenceGroupId(uint64_t var)
+void nn::hac::ApplicationControlPropertyBinary::setPresenceGroupId(uint64_t var)
 {
 	mPresenceGroupId = var;
 }
 
-const fnd::List<nx::ApplicationControlPropertyBinary::sRating>& nx::ApplicationControlPropertyBinary::getRatingAge() const
+const fnd::List<nn::hac::ApplicationControlPropertyBinary::sRating>& nn::hac::ApplicationControlPropertyBinary::getRatingAge() const
 {
 	return mRatingAge;
 }
 
-void nx::ApplicationControlPropertyBinary::setRatingAge(const fnd::List<sRating>& var)
+void nn::hac::ApplicationControlPropertyBinary::setRatingAge(const fnd::List<sRating>& var)
 {
 	mRatingAge = var;
 }
 
-const std::string& nx::ApplicationControlPropertyBinary::getDisplayVersion() const
+const std::string& nn::hac::ApplicationControlPropertyBinary::getDisplayVersion() const
 {
 	return mDisplayVersion;
 }
 
-void nx::ApplicationControlPropertyBinary::setDisplayVersion(const std::string& var)
+void nn::hac::ApplicationControlPropertyBinary::setDisplayVersion(const std::string& var)
 {
 	mDisplayVersion = var;
 }
 
-uint64_t nx::ApplicationControlPropertyBinary::getAocBaseId() const
+uint64_t nn::hac::ApplicationControlPropertyBinary::getAocBaseId() const
 {
 	return mAocBaseId;
 }
 
-void nx::ApplicationControlPropertyBinary::setAocBaseId(uint64_t var)
+void nn::hac::ApplicationControlPropertyBinary::setAocBaseId(uint64_t var)
 {
 	mAocBaseId = var;
 }
 
-uint64_t nx::ApplicationControlPropertyBinary::getSaveDatawOwnerId() const
+uint64_t nn::hac::ApplicationControlPropertyBinary::getSaveDatawOwnerId() const
 {
 	return mSaveDatawOwnerId;
 }
 
-void nx::ApplicationControlPropertyBinary::setSaveDatawOwnerId(uint64_t var)
+void nn::hac::ApplicationControlPropertyBinary::setSaveDatawOwnerId(uint64_t var)
 {
 	mSaveDatawOwnerId = var;
 }
 
-const nx::ApplicationControlPropertyBinary::sStorageSize& nx::ApplicationControlPropertyBinary::getUserAccountSaveDataSize() const
+const nn::hac::ApplicationControlPropertyBinary::sStorageSize& nn::hac::ApplicationControlPropertyBinary::getUserAccountSaveDataSize() const
 {
 	return mUserAccountSaveDataSize;
 }
 
-void nx::ApplicationControlPropertyBinary::setUserAccountSaveDataSize(const sStorageSize& var)
+void nn::hac::ApplicationControlPropertyBinary::setUserAccountSaveDataSize(const sStorageSize& var)
 {
 	mUserAccountSaveDataSize = var;
 }
 
-const nx::ApplicationControlPropertyBinary::sStorageSize& nx::ApplicationControlPropertyBinary::getDeviceSaveDataSize() const
+const nn::hac::ApplicationControlPropertyBinary::sStorageSize& nn::hac::ApplicationControlPropertyBinary::getDeviceSaveDataSize() const
 {
 	return mDeviceSaveDataSize;
 }
 
-void nx::ApplicationControlPropertyBinary::setDeviceSaveDataSize(const sStorageSize& var)
+void nn::hac::ApplicationControlPropertyBinary::setDeviceSaveDataSize(const sStorageSize& var)
 {
 	mDeviceSaveDataSize = var;
 }
 
-int64_t nx::ApplicationControlPropertyBinary::getBcatDeliveryCacheStorageSize() const
+int64_t nn::hac::ApplicationControlPropertyBinary::getBcatDeliveryCacheStorageSize() const
 {
 	return mBcatDeliveryCacheStorageSize;
 }
 
-void nx::ApplicationControlPropertyBinary::setBcatDeliveryCacheStorageSize(int64_t var)
+void nn::hac::ApplicationControlPropertyBinary::setBcatDeliveryCacheStorageSize(int64_t var)
 {
 	mBcatDeliveryCacheStorageSize = var;
 }
 
-const std::string& nx::ApplicationControlPropertyBinary::getApplicationErrorCodeCategory() const
+const std::string& nn::hac::ApplicationControlPropertyBinary::getApplicationErrorCodeCategory() const
 {
 	return mApplicationErrorCodeCategory;
 }
 
-void nx::ApplicationControlPropertyBinary::setApplicationErrorCodeCategory(const std::string& var)
+void nn::hac::ApplicationControlPropertyBinary::setApplicationErrorCodeCategory(const std::string& var)
 {
 	mApplicationErrorCodeCategory = var;
 }
 
-const fnd::List<uint64_t>& nx::ApplicationControlPropertyBinary::getLocalCommunicationId() const
+const fnd::List<uint64_t>& nn::hac::ApplicationControlPropertyBinary::getLocalCommunicationId() const
 {
 	return mLocalCommunicationId;
 }
 
-void nx::ApplicationControlPropertyBinary::setLocalCommunicationId(const fnd::List<uint64_t>& var)
+void nn::hac::ApplicationControlPropertyBinary::setLocalCommunicationId(const fnd::List<uint64_t>& var)
 {
 	mLocalCommunicationId = var;
 }
 
-nx::nacp::LogoType nx::ApplicationControlPropertyBinary::getLogoType() const
+nn::hac::nacp::LogoType nn::hac::ApplicationControlPropertyBinary::getLogoType() const
 {
 	return mLogoType;
 }
 
-void nx::ApplicationControlPropertyBinary::setLogoType(nacp::LogoType var)
+void nn::hac::ApplicationControlPropertyBinary::setLogoType(nacp::LogoType var)
 {
 	mLogoType = var;
 }
 
-nx::nacp::LogoHandling nx::ApplicationControlPropertyBinary::getLogoHandling() const
+nn::hac::nacp::LogoHandling nn::hac::ApplicationControlPropertyBinary::getLogoHandling() const
 {
 	return mLogoHandling;
 }
 
-void nx::ApplicationControlPropertyBinary::setLogoHandling(nacp::LogoHandling var)
+void nn::hac::ApplicationControlPropertyBinary::setLogoHandling(nacp::LogoHandling var)
 {
 	mLogoHandling = var;
 }
 
-nx::nacp::RuntimeAocInstallMode nx::ApplicationControlPropertyBinary::getRuntimeAocInstallMode() const
+nn::hac::nacp::RuntimeAocInstallMode nn::hac::ApplicationControlPropertyBinary::getRuntimeAocInstallMode() const
 {
 	return mRuntimeAocInstallMode;
 }
 
-void nx::ApplicationControlPropertyBinary::setRuntimeAocInstallMode(nacp::RuntimeAocInstallMode var)
+void nn::hac::ApplicationControlPropertyBinary::setRuntimeAocInstallMode(nacp::RuntimeAocInstallMode var)
 {
 	mRuntimeAocInstallMode = var;
 }
 
-nx::nacp::CrashReportMode nx::ApplicationControlPropertyBinary::getCrashReportMode() const
+nn::hac::nacp::CrashReportMode nn::hac::ApplicationControlPropertyBinary::getCrashReportMode() const
 {
 	return mCrashReportMode;
 }
 
-void nx::ApplicationControlPropertyBinary::setCrashReportMode(nacp::CrashReportMode var)
+void nn::hac::ApplicationControlPropertyBinary::setCrashReportMode(nacp::CrashReportMode var)
 {
 	mCrashReportMode = var;
 }
 
-nx::nacp::Hdcp nx::ApplicationControlPropertyBinary::getHdcp() const
+nn::hac::nacp::Hdcp nn::hac::ApplicationControlPropertyBinary::getHdcp() const
 {
 	return mHdcp;
 }
 
-void nx::ApplicationControlPropertyBinary::setHdcp(nacp::Hdcp var)
+void nn::hac::ApplicationControlPropertyBinary::setHdcp(nacp::Hdcp var)
 {
 	mHdcp = var;
 }
 
-uint64_t nx::ApplicationControlPropertyBinary::getSeedForPsuedoDeviceId() const
+uint64_t nn::hac::ApplicationControlPropertyBinary::getSeedForPsuedoDeviceId() const
 {
 	return mSeedForPsuedoDeviceId;
 }
 
-void nx::ApplicationControlPropertyBinary::setSeedForPsuedoDeviceId(uint64_t var)
+void nn::hac::ApplicationControlPropertyBinary::setSeedForPsuedoDeviceId(uint64_t var)
 {
 	mSeedForPsuedoDeviceId = var;
 }
 
-const std::string& nx::ApplicationControlPropertyBinary::getBcatPassphase() const
+const std::string& nn::hac::ApplicationControlPropertyBinary::getBcatPassphase() const
 {
 	return mBcatPassphase;
 }
 
-void nx::ApplicationControlPropertyBinary::setBcatPassphase(const std::string& var)
+void nn::hac::ApplicationControlPropertyBinary::setBcatPassphase(const std::string& var)
 {
 	mBcatPassphase = var;
 }
 
-const nx::ApplicationControlPropertyBinary::sStorageSize& nx::ApplicationControlPropertyBinary::getUserAccountSaveDataMax() const
+const nn::hac::ApplicationControlPropertyBinary::sStorageSize& nn::hac::ApplicationControlPropertyBinary::getUserAccountSaveDataMax() const
 {
 	return mUserAccountSaveDataMax;
 }
 
-void nx::ApplicationControlPropertyBinary::setUserAccountSaveDataMax(const sStorageSize& var)
+void nn::hac::ApplicationControlPropertyBinary::setUserAccountSaveDataMax(const sStorageSize& var)
 {
 	mUserAccountSaveDataMax = var;
 }
 
-const nx::ApplicationControlPropertyBinary::sStorageSize& nx::ApplicationControlPropertyBinary::getDeviceSaveDataMax() const
+const nn::hac::ApplicationControlPropertyBinary::sStorageSize& nn::hac::ApplicationControlPropertyBinary::getDeviceSaveDataMax() const
 {
 	return mDeviceSaveDataMax;
 }
 
-void nx::ApplicationControlPropertyBinary::setDeviceSaveDataMax(const sStorageSize& var)
+void nn::hac::ApplicationControlPropertyBinary::setDeviceSaveDataMax(const sStorageSize& var)
 {
 	mDeviceSaveDataMax = var;
 }
 
-int64_t nx::ApplicationControlPropertyBinary::getTemporaryStorageSize() const
+int64_t nn::hac::ApplicationControlPropertyBinary::getTemporaryStorageSize() const
 {
 	return mTemporaryStorageSize;
 }
 
-void nx::ApplicationControlPropertyBinary::setTemporaryStorageSize(int64_t var)
+void nn::hac::ApplicationControlPropertyBinary::setTemporaryStorageSize(int64_t var)
 {
 	mTemporaryStorageSize = var;
 }
 
-const nx::ApplicationControlPropertyBinary::sStorageSize& nx::ApplicationControlPropertyBinary::getCacheStorageSize() const
+const nn::hac::ApplicationControlPropertyBinary::sStorageSize& nn::hac::ApplicationControlPropertyBinary::getCacheStorageSize() const
 {
 	return mCacheStorageSize;
 }
 
-void nx::ApplicationControlPropertyBinary::setCacheStorageSize(const sStorageSize& var)
+void nn::hac::ApplicationControlPropertyBinary::setCacheStorageSize(const sStorageSize& var)
 {
 	mCacheStorageSize = var;
 }
 
-int64_t nx::ApplicationControlPropertyBinary::getCacheStorageDataAndJournalSizeMax() const
+int64_t nn::hac::ApplicationControlPropertyBinary::getCacheStorageDataAndJournalSizeMax() const
 {
 	return mCacheStorageDataAndJournalSizeMax;
 }
 
-void nx::ApplicationControlPropertyBinary::setCacheStorageDataAndJournalSizeMax(int64_t var)
+void nn::hac::ApplicationControlPropertyBinary::setCacheStorageDataAndJournalSizeMax(int64_t var)
 {
 	mCacheStorageDataAndJournalSizeMax = var;
 }
 
-uint16_t nx::ApplicationControlPropertyBinary::getCacheStorageIndexMax() const
+uint16_t nn::hac::ApplicationControlPropertyBinary::getCacheStorageIndexMax() const
 {
 	return mCacheStorageIndexMax;
 }
 
-void nx::ApplicationControlPropertyBinary::setCacheStorageIndexMax(uint16_t var)
+void nn::hac::ApplicationControlPropertyBinary::setCacheStorageIndexMax(uint16_t var)
 {
 	mCacheStorageIndexMax = var;
 }
 
-const fnd::List<uint64_t>& nx::ApplicationControlPropertyBinary::getPlayLogQueryableApplicationId() const
+const fnd::List<uint64_t>& nn::hac::ApplicationControlPropertyBinary::getPlayLogQueryableApplicationId() const
 {
 	return mPlayLogQueryableApplicationId;
 }
 
-void nx::ApplicationControlPropertyBinary::setPlayLogQueryableApplicationId(const fnd::List<uint64_t>& var)
+void nn::hac::ApplicationControlPropertyBinary::setPlayLogQueryableApplicationId(const fnd::List<uint64_t>& var)
 {
 	mPlayLogQueryableApplicationId = var;
 }
 
-nx::nacp::PlayLogQueryCapability nx::ApplicationControlPropertyBinary::getPlayLogQueryCapability() const
+nn::hac::nacp::PlayLogQueryCapability nn::hac::ApplicationControlPropertyBinary::getPlayLogQueryCapability() const
 {
 	return mPlayLogQueryCapability;
 }
 
-void nx::ApplicationControlPropertyBinary::setPlayLogQueryCapability(nacp::PlayLogQueryCapability var)
+void nn::hac::ApplicationControlPropertyBinary::setPlayLogQueryCapability(nacp::PlayLogQueryCapability var)
 {
 	mPlayLogQueryCapability = var;
 }
 
-nx::nacp::RepairFlag nx::ApplicationControlPropertyBinary::getRepairFlag() const
+nn::hac::nacp::RepairFlag nn::hac::ApplicationControlPropertyBinary::getRepairFlag() const
 {
 	return mRepairFlag;
 }
 
-void nx::ApplicationControlPropertyBinary::setRepairFlag(nacp::RepairFlag var)
+void nn::hac::ApplicationControlPropertyBinary::setRepairFlag(nacp::RepairFlag var)
 {
 	mRepairFlag = var;
 }
 
-byte_t nx::ApplicationControlPropertyBinary::getProgramIndex() const
+byte_t nn::hac::ApplicationControlPropertyBinary::getProgramIndex() const
 {
 	return mProgramIndex;
 }
 
-void nx::ApplicationControlPropertyBinary::setProgramIndex(byte_t var)
+void nn::hac::ApplicationControlPropertyBinary::setProgramIndex(byte_t var)
 {
 	mProgramIndex = var;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/ApplicationControlPropertyUtils.cpp b/lib/libhac/source/ApplicationControlPropertyUtils.cpp
index 5e1076c..b0c3e7b 100644
--- a/lib/libhac/source/ApplicationControlPropertyUtils.cpp
+++ b/lib/libhac/source/ApplicationControlPropertyUtils.cpp
@@ -1,11 +1,11 @@
-#include <nx/ApplicationControlPropertyUtils.h>
+#include <nn/hac/ApplicationControlPropertyUtils.h>
 
-bool nx::ApplicationControlPropertyUtils::validateSaveDataSizeMax(int64_t size, int64_t alignment)
+bool nn::hac::ApplicationControlPropertyUtils::validateSaveDataSizeMax(int64_t size, int64_t alignment)
 {
 	return (alignment != 0 && (size & (alignment - 1)) != 0) == false;
 }
 
-bool nx::ApplicationControlPropertyUtils::validateSaveDataSize(int64_t size)
+bool nn::hac::ApplicationControlPropertyUtils::validateSaveDataSize(int64_t size)
 {
 	return (size & 0x3fff) == 0;
 }
diff --git a/lib/libhac/source/ContentMetaBinary.cpp b/lib/libhac/source/ContentMetaBinary.cpp
index b90de17..22c5ab7 100644
--- a/lib/libhac/source/ContentMetaBinary.cpp
+++ b/lib/libhac/source/ContentMetaBinary.cpp
@@ -1,16 +1,16 @@
-#include <nx/ContentMetaBinary.h>
+#include <nn/hac/ContentMetaBinary.h>
 
-nx::ContentMetaBinary::ContentMetaBinary()
+nn::hac::ContentMetaBinary::ContentMetaBinary()
 {
 	clear();
 }
 
-nx::ContentMetaBinary::ContentMetaBinary(const ContentMetaBinary & other)
+nn::hac::ContentMetaBinary::ContentMetaBinary(const ContentMetaBinary & other)
 {
 	*this = other;
 }
 
-void nx::ContentMetaBinary::operator=(const ContentMetaBinary& other)
+void nn::hac::ContentMetaBinary::operator=(const ContentMetaBinary& other)
 {
 	if (other.getBytes().size() > 0)
 	{
@@ -36,7 +36,7 @@ void nx::ContentMetaBinary::operator=(const ContentMetaBinary& other)
 	}
 }
 
-bool nx::ContentMetaBinary::operator==(const ContentMetaBinary& other) const
+bool nn::hac::ContentMetaBinary::operator==(const ContentMetaBinary& other) const
 {
 	return (mTitleId == other.mTitleId) \
 		&& (mTitleVersion == other.mTitleVersion) \
@@ -54,17 +54,17 @@ bool nx::ContentMetaBinary::operator==(const ContentMetaBinary& other) const
 		&& (memcmp(mDigest.data, other.mDigest.data, cnmt::kDigestLen) == 0);
 }
 
-bool nx::ContentMetaBinary::operator!=(const ContentMetaBinary& other) const
+bool nn::hac::ContentMetaBinary::operator!=(const ContentMetaBinary& other) const
 {
 	return !(*this == other);
 }
 
-void nx::ContentMetaBinary::toBytes()
+void nn::hac::ContentMetaBinary::toBytes()
 {
 	throw fnd::Exception(kModuleName, "exportBinary() not implemented");
 }
 
-void nx::ContentMetaBinary::fromBytes(const byte_t* data, size_t len)
+void nn::hac::ContentMetaBinary::fromBytes(const byte_t* data, size_t len)
 {
 	// clear member variables
 	clear();
@@ -153,12 +153,12 @@ void nx::ContentMetaBinary::fromBytes(const byte_t* data, size_t len)
 	memcpy(mDigest.data, data + getDigestOffset(hdr->exhdr_size.get(), hdr->content_count.get(), hdr->content_meta_count.get(), exdata_size), cnmt::kDigestLen);
 }
 
-const fnd::Vec<byte_t>& nx::ContentMetaBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::ContentMetaBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::ContentMetaBinary::clear()
+void nn::hac::ContentMetaBinary::clear()
 {
 	mRawBinary.clear();
 	mTitleId = 0;
@@ -177,138 +177,138 @@ void nx::ContentMetaBinary::clear()
 	memset(mDigest.data, 0, cnmt::kDigestLen);
 }
 
-uint64_t nx::ContentMetaBinary::getTitleId() const
+uint64_t nn::hac::ContentMetaBinary::getTitleId() const
 {
 	return mTitleId;
 }
 
-void nx::ContentMetaBinary::setTitleId(uint64_t title_id)
+void nn::hac::ContentMetaBinary::setTitleId(uint64_t title_id)
 {
 	mTitleId = title_id;
 }
 
-uint32_t nx::ContentMetaBinary::getTitleVersion() const
+uint32_t nn::hac::ContentMetaBinary::getTitleVersion() const
 {
 	return mTitleVersion;
 }
 
-void nx::ContentMetaBinary::setTitleVersion(uint32_t version)
+void nn::hac::ContentMetaBinary::setTitleVersion(uint32_t version)
 {
 	mTitleVersion = version;
 }
 
-nx::cnmt::ContentMetaType nx::ContentMetaBinary::getType() const
+nn::hac::cnmt::ContentMetaType nn::hac::ContentMetaBinary::getType() const
 {
 	return mType;
 }
 
-void nx::ContentMetaBinary::setType(cnmt::ContentMetaType type)
+void nn::hac::ContentMetaBinary::setType(cnmt::ContentMetaType type)
 {
 	mType = type;
 }
 
-byte_t nx::ContentMetaBinary::getAttributes() const
+byte_t nn::hac::ContentMetaBinary::getAttributes() const
 {
 	return mAttributes;
 }
 
-void nx::ContentMetaBinary::setAttributes(byte_t attributes)
+void nn::hac::ContentMetaBinary::setAttributes(byte_t attributes)
 {
 	mAttributes = attributes;
 }
 
-uint32_t nx::ContentMetaBinary::getRequiredDownloadSystemVersion() const
+uint32_t nn::hac::ContentMetaBinary::getRequiredDownloadSystemVersion() const
 {
 	return mRequiredDownloadSystemVersion;
 }
 
-void nx::ContentMetaBinary::setRequiredDownloadSystemVersion(uint32_t version)
+void nn::hac::ContentMetaBinary::setRequiredDownloadSystemVersion(uint32_t version)
 {
 	mRequiredDownloadSystemVersion = version;
 }
 
-const nx::ContentMetaBinary::ApplicationMetaExtendedHeader& nx::ContentMetaBinary::getApplicationMetaExtendedHeader() const
+const nn::hac::ContentMetaBinary::ApplicationMetaExtendedHeader& nn::hac::ContentMetaBinary::getApplicationMetaExtendedHeader() const
 {
 	return mApplicationMetaExtendedHeader;
 }
 
-void nx::ContentMetaBinary::setApplicationMetaExtendedHeader(const ApplicationMetaExtendedHeader& exhdr)
+void nn::hac::ContentMetaBinary::setApplicationMetaExtendedHeader(const ApplicationMetaExtendedHeader& exhdr)
 {
 	mApplicationMetaExtendedHeader = exhdr;
 }
 
-const nx::ContentMetaBinary::PatchMetaExtendedHeader& nx::ContentMetaBinary::getPatchMetaExtendedHeader() const
+const nn::hac::ContentMetaBinary::PatchMetaExtendedHeader& nn::hac::ContentMetaBinary::getPatchMetaExtendedHeader() const
 {
 	return mPatchMetaExtendedHeader;
 }
 
-void nx::ContentMetaBinary::setPatchMetaExtendedHeader(const PatchMetaExtendedHeader& exhdr)
+void nn::hac::ContentMetaBinary::setPatchMetaExtendedHeader(const PatchMetaExtendedHeader& exhdr)
 {
 	mPatchMetaExtendedHeader = exhdr;
 }
 
-const nx::ContentMetaBinary::AddOnContentMetaExtendedHeader& nx::ContentMetaBinary::getAddOnContentMetaExtendedHeader() const
+const nn::hac::ContentMetaBinary::AddOnContentMetaExtendedHeader& nn::hac::ContentMetaBinary::getAddOnContentMetaExtendedHeader() const
 {
 	return mAddOnContentMetaExtendedHeader;
 }
 
-void nx::ContentMetaBinary::setAddOnContentMetaExtendedHeader(const AddOnContentMetaExtendedHeader& exhdr)
+void nn::hac::ContentMetaBinary::setAddOnContentMetaExtendedHeader(const AddOnContentMetaExtendedHeader& exhdr)
 {
 	mAddOnContentMetaExtendedHeader = exhdr;
 }
 
-const nx::ContentMetaBinary::DeltaMetaExtendedHeader& nx::ContentMetaBinary::getDeltaMetaExtendedHeader() const
+const nn::hac::ContentMetaBinary::DeltaMetaExtendedHeader& nn::hac::ContentMetaBinary::getDeltaMetaExtendedHeader() const
 {
 	return mDeltaMetaExtendedHeader;
 }
 
-void nx::ContentMetaBinary::setDeltaMetaExtendedHeader(const DeltaMetaExtendedHeader& exhdr)
+void nn::hac::ContentMetaBinary::setDeltaMetaExtendedHeader(const DeltaMetaExtendedHeader& exhdr)
 {
 	mDeltaMetaExtendedHeader = exhdr;
 }
 
-const fnd::List<nx::ContentMetaBinary::ContentInfo>& nx::ContentMetaBinary::getContentInfo() const
+const fnd::List<nn::hac::ContentMetaBinary::ContentInfo>& nn::hac::ContentMetaBinary::getContentInfo() const
 {
 	return mContentInfo;
 }
 
-void nx::ContentMetaBinary::setContentInfo(const fnd::List<nx::ContentMetaBinary::ContentInfo>& info)
+void nn::hac::ContentMetaBinary::setContentInfo(const fnd::List<nn::hac::ContentMetaBinary::ContentInfo>& info)
 {
 	mContentInfo = info;
 }
 
-const fnd::List<nx::ContentMetaBinary::ContentMetaInfo>& nx::ContentMetaBinary::getContentMetaInfo() const
+const fnd::List<nn::hac::ContentMetaBinary::ContentMetaInfo>& nn::hac::ContentMetaBinary::getContentMetaInfo() const
 {
 	return mContentMetaInfo;
 }
 
-void nx::ContentMetaBinary::setContentMetaInfo(const fnd::List<nx::ContentMetaBinary::ContentMetaInfo>& info)
+void nn::hac::ContentMetaBinary::setContentMetaInfo(const fnd::List<nn::hac::ContentMetaBinary::ContentMetaInfo>& info)
 {
 	mContentMetaInfo = info;
 }
 
-const fnd::Vec<byte_t> & nx::ContentMetaBinary::getExtendedData() const
+const fnd::Vec<byte_t> & nn::hac::ContentMetaBinary::getExtendedData() const
 {
 	return mExtendedData;
 }
 
-void nx::ContentMetaBinary::setExtendedData(const fnd::Vec<byte_t> & data)
+void nn::hac::ContentMetaBinary::setExtendedData(const fnd::Vec<byte_t> & data)
 {
 	mExtendedData = data;
 }
 
-const nx::sDigest & nx::ContentMetaBinary::getDigest() const
+const nn::hac::sDigest & nn::hac::ContentMetaBinary::getDigest() const
 {
 	return mDigest;
 }
 
-void nx::ContentMetaBinary::setDigest(const nx::sDigest & digest)
+void nn::hac::ContentMetaBinary::setDigest(const nn::hac::sDigest & digest)
 {
 
 	memcpy(mDigest.data, digest.data, cnmt::kDigestLen);
 }
 
-bool nx::ContentMetaBinary::validateExtendedHeaderSize(cnmt::ContentMetaType type, size_t exhdrSize) const
+bool nn::hac::ContentMetaBinary::validateExtendedHeaderSize(cnmt::ContentMetaType type, size_t exhdrSize) const
 {
 	bool validSize = false;
 
@@ -333,7 +333,7 @@ bool nx::ContentMetaBinary::validateExtendedHeaderSize(cnmt::ContentMetaType typ
 	return validSize;
 }
 
-size_t nx::ContentMetaBinary::getExtendedDataSize(cnmt::ContentMetaType type, const byte_t * data) const
+size_t nn::hac::ContentMetaBinary::getExtendedDataSize(cnmt::ContentMetaType type, const byte_t * data) const
 {
 	size_t exdata_len = 0;
 	if (type == cnmt::METATYPE_PATCH)
@@ -349,7 +349,7 @@ size_t nx::ContentMetaBinary::getExtendedDataSize(cnmt::ContentMetaType type, co
 	return exdata_len;
 }
 
-void nx::ContentMetaBinary::validateBinary(const byte_t * data, size_t len) const
+void nn::hac::ContentMetaBinary::validateBinary(const byte_t * data, size_t len) const
 {
 	// check if it is large enough to read the header
 	if (len < sizeof(sContentMetaHeader))
diff --git a/lib/libhac/source/FileSystemAccessControlBinary.cpp b/lib/libhac/source/FileSystemAccessControlBinary.cpp
index c2c4c94..81e007f 100644
--- a/lib/libhac/source/FileSystemAccessControlBinary.cpp
+++ b/lib/libhac/source/FileSystemAccessControlBinary.cpp
@@ -1,18 +1,18 @@
-#include <nx/FileSystemAccessControlBinary.h>
+#include <nn/hac/FileSystemAccessControlBinary.h>
 
 #include <fnd/SimpleTextOutput.h>
 
-nx::FileSystemAccessControlBinary::FileSystemAccessControlBinary()
+nn::hac::FileSystemAccessControlBinary::FileSystemAccessControlBinary()
 {
 	clear();
 }
 
-nx::FileSystemAccessControlBinary::FileSystemAccessControlBinary(const FileSystemAccessControlBinary & other)
+nn::hac::FileSystemAccessControlBinary::FileSystemAccessControlBinary(const FileSystemAccessControlBinary & other)
 {
 	*this = other;
 }
 
-void nx::FileSystemAccessControlBinary::operator=(const FileSystemAccessControlBinary & other)
+void nn::hac::FileSystemAccessControlBinary::operator=(const FileSystemAccessControlBinary & other)
 {
 	mRawBinary = other.mRawBinary;
 	mVersion = other.mVersion;
@@ -21,7 +21,7 @@ void nx::FileSystemAccessControlBinary::operator=(const FileSystemAccessControlB
 	mSaveDataOwnerIdList = other.mSaveDataOwnerIdList;
 }
 
-bool nx::FileSystemAccessControlBinary::operator==(const FileSystemAccessControlBinary & other) const
+bool nn::hac::FileSystemAccessControlBinary::operator==(const FileSystemAccessControlBinary & other) const
 {
 	return (mVersion == other.mVersion) \
 		&& (mFsaRights == other.mFsaRights) \
@@ -29,12 +29,12 @@ bool nx::FileSystemAccessControlBinary::operator==(const FileSystemAccessControl
 		&& (mSaveDataOwnerIdList == other.mSaveDataOwnerIdList);
 }
 
-bool nx::FileSystemAccessControlBinary::operator!=(const FileSystemAccessControlBinary & other) const
+bool nn::hac::FileSystemAccessControlBinary::operator!=(const FileSystemAccessControlBinary & other) const
 {
 	return !(*this == other);
 }
 
-void nx::FileSystemAccessControlBinary::toBytes()
+void nn::hac::FileSystemAccessControlBinary::toBytes()
 {
 	// determine section layout
 	struct sLayout {
@@ -91,7 +91,7 @@ void nx::FileSystemAccessControlBinary::toBytes()
 	}
 }
 
-void nx::FileSystemAccessControlBinary::fromBytes(const byte_t* data, size_t len)
+void nn::hac::FileSystemAccessControlBinary::fromBytes(const byte_t* data, size_t len)
 {
 	// check size
 	if (len < sizeof(sFacHeader))
@@ -157,12 +157,12 @@ void nx::FileSystemAccessControlBinary::fromBytes(const byte_t* data, size_t len
 	}
 }
 
-const fnd::Vec<byte_t>& nx::FileSystemAccessControlBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::FileSystemAccessControlBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::FileSystemAccessControlBinary::clear()
+void nn::hac::FileSystemAccessControlBinary::clear()
 {
 	mRawBinary.clear();
 	mVersion = 0;
@@ -171,42 +171,42 @@ void nx::FileSystemAccessControlBinary::clear()
 	mSaveDataOwnerIdList.clear();
 }
 
-uint32_t nx::FileSystemAccessControlBinary::getFormatVersion() const
+uint32_t nn::hac::FileSystemAccessControlBinary::getFormatVersion() const
 {
 	return mVersion;
 }
 
-void nx::FileSystemAccessControlBinary::setFormatVersion(uint32_t format_version)
+void nn::hac::FileSystemAccessControlBinary::setFormatVersion(uint32_t format_version)
 {
 	mVersion = format_version;
 }
 
-const fnd::List<nx::fac::FsAccessFlag>& nx::FileSystemAccessControlBinary::getFsaRightsList() const
+const fnd::List<nn::hac::fac::FsAccessFlag>& nn::hac::FileSystemAccessControlBinary::getFsaRightsList() const
 {
 	return mFsaRights;
 }
 
-void nx::FileSystemAccessControlBinary::setFsaRightsList(const fnd::List<fac::FsAccessFlag>& list)
+void nn::hac::FileSystemAccessControlBinary::setFsaRightsList(const fnd::List<fac::FsAccessFlag>& list)
 {
 	mFsaRights = list;
 }
 
-const fnd::List<uint64_t>& nx::FileSystemAccessControlBinary::getContentOwnerIdList() const
+const fnd::List<uint64_t>& nn::hac::FileSystemAccessControlBinary::getContentOwnerIdList() const
 {
 	return mContentOwnerIdList;
 }
 
-void nx::FileSystemAccessControlBinary::setContentOwnerIdList(const fnd::List<uint64_t>& list)
+void nn::hac::FileSystemAccessControlBinary::setContentOwnerIdList(const fnd::List<uint64_t>& list)
 {
 	mContentOwnerIdList = list;
 }
 
-const fnd::List<nx::FileSystemAccessControlBinary::sSaveDataOwnerId>& nx::FileSystemAccessControlBinary::getSaveDataOwnerIdList() const
+const fnd::List<nn::hac::FileSystemAccessControlBinary::sSaveDataOwnerId>& nn::hac::FileSystemAccessControlBinary::getSaveDataOwnerIdList() const
 {
 	return mSaveDataOwnerIdList;
 }
 
-void nx::FileSystemAccessControlBinary::setSaveDataOwnerIdList(const fnd::List<sSaveDataOwnerId>& list)
+void nn::hac::FileSystemAccessControlBinary::setSaveDataOwnerIdList(const fnd::List<sSaveDataOwnerId>& list)
 {
 	mSaveDataOwnerIdList = list;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/HandleTableSizeEntry.cpp b/lib/libhac/source/HandleTableSizeEntry.cpp
index c01471c..23c6257 100644
--- a/lib/libhac/source/HandleTableSizeEntry.cpp
+++ b/lib/libhac/source/HandleTableSizeEntry.cpp
@@ -1,47 +1,47 @@
-#include <nx/HandleTableSizeEntry.h>
+#include <nn/hac/HandleTableSizeEntry.h>
 
-nx::HandleTableSizeEntry::HandleTableSizeEntry() :
+nn::hac::HandleTableSizeEntry::HandleTableSizeEntry() :
 	mCap(kCapId),
 	mHandleTableSize(0)
 {}
 
-nx::HandleTableSizeEntry::HandleTableSizeEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::HandleTableSizeEntry::HandleTableSizeEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kCapId),
 	mHandleTableSize(0)
 {
 	setKernelCapability(kernel_cap);
 }
 
-nx::HandleTableSizeEntry::HandleTableSizeEntry(uint16_t size) :
+nn::hac::HandleTableSizeEntry::HandleTableSizeEntry(uint16_t size) :
 	mCap(kCapId),
 	mHandleTableSize(0)
 {
 	setHandleTableSize(size);
 }
 
-void nx::HandleTableSizeEntry::operator=(const HandleTableSizeEntry& other)
+void nn::hac::HandleTableSizeEntry::operator=(const HandleTableSizeEntry& other)
 {
 	mHandleTableSize = other.mHandleTableSize;
 	updateCapField();
 }
 
-bool nx::HandleTableSizeEntry::operator==(const HandleTableSizeEntry& other) const
+bool nn::hac::HandleTableSizeEntry::operator==(const HandleTableSizeEntry& other) const
 {
 	return (mHandleTableSize == other.mHandleTableSize);
 }
 
-bool nx::HandleTableSizeEntry::operator!=(const HandleTableSizeEntry& other) const
+bool nn::hac::HandleTableSizeEntry::operator!=(const HandleTableSizeEntry& other) const
 {
 	return !(*this == other);
 }
 
 
-const nx::KernelCapabilityEntry & nx::HandleTableSizeEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::HandleTableSizeEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::HandleTableSizeEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::HandleTableSizeEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kCapId)
 	{
@@ -52,12 +52,12 @@ void nx::HandleTableSizeEntry::setKernelCapability(const KernelCapabilityEntry &
 	processCapField();
 }
 
-uint16_t nx::HandleTableSizeEntry::getHandleTableSize() const
+uint16_t nn::hac::HandleTableSizeEntry::getHandleTableSize() const
 {
 	return mHandleTableSize;
 }
 
-void nx::HandleTableSizeEntry::setHandleTableSize(uint16_t size)
+void nn::hac::HandleTableSizeEntry::setHandleTableSize(uint16_t size)
 {
 	if (size > kMaxHandleTableSize)
 	{
diff --git a/lib/libhac/source/HandleTableSizeHandler.cpp b/lib/libhac/source/HandleTableSizeHandler.cpp
index da1bda1..3b429cf 100644
--- a/lib/libhac/source/HandleTableSizeHandler.cpp
+++ b/lib/libhac/source/HandleTableSizeHandler.cpp
@@ -1,28 +1,28 @@
-#include <nx/HandleTableSizeHandler.h>
+#include <nn/hac/HandleTableSizeHandler.h>
 
-nx::HandleTableSizeHandler::HandleTableSizeHandler() :
+nn::hac::HandleTableSizeHandler::HandleTableSizeHandler() :
 	mIsSet(false),
 	mEntry(0)
 {}
 
-void nx::HandleTableSizeHandler::operator=(const HandleTableSizeHandler & other)
+void nn::hac::HandleTableSizeHandler::operator=(const HandleTableSizeHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mEntry.setKernelCapability(other.mEntry.getKernelCapability());
 }
 
-bool nx::HandleTableSizeHandler::operator==(const HandleTableSizeHandler & other) const
+bool nn::hac::HandleTableSizeHandler::operator==(const HandleTableSizeHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mEntry.getKernelCapability() == other.mEntry.getKernelCapability());
 }
 
-bool nx::HandleTableSizeHandler::operator!=(const HandleTableSizeHandler & other) const
+bool nn::hac::HandleTableSizeHandler::operator!=(const HandleTableSizeHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::HandleTableSizeHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::HandleTableSizeHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() > kMaxKernelCapNum)
 	{
@@ -36,7 +36,7 @@ void nx::HandleTableSizeHandler::importKernelCapabilityList(const fnd::List<Kern
 	mIsSet = true;
 }
 
-void nx::HandleTableSizeHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::HandleTableSizeHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -44,23 +44,23 @@ void nx::HandleTableSizeHandler::exportKernelCapabilityList(fnd::List<KernelCapa
 	caps.addElement(mEntry.getKernelCapability());
 }
 
-void nx::HandleTableSizeHandler::clear()
+void nn::hac::HandleTableSizeHandler::clear()
 {
 	mIsSet = false;
 	mEntry.setHandleTableSize(0);
 }
 
-bool nx::HandleTableSizeHandler::isSet() const
+bool nn::hac::HandleTableSizeHandler::isSet() const
 {
 	return mIsSet;
 }
 
-uint16_t nx::HandleTableSizeHandler::getHandleTableSize() const
+uint16_t nn::hac::HandleTableSizeHandler::getHandleTableSize() const
 {
 	return mEntry.getHandleTableSize();
 }
 
-void nx::HandleTableSizeHandler::setHandleTableSize(uint16_t size)
+void nn::hac::HandleTableSizeHandler::setHandleTableSize(uint16_t size)
 {
 	mEntry.setHandleTableSize(size);
 	mIsSet = true;
diff --git a/lib/libhac/source/HierarchicalIntegrityHeader.cpp b/lib/libhac/source/HierarchicalIntegrityHeader.cpp
index 6454400..3075a1c 100644
--- a/lib/libhac/source/HierarchicalIntegrityHeader.cpp
+++ b/lib/libhac/source/HierarchicalIntegrityHeader.cpp
@@ -1,17 +1,17 @@
 #include <sstream>
-#include <nx/HierarchicalIntegrityHeader.h>
+#include <nn/hac/HierarchicalIntegrityHeader.h>
 
-nx::HierarchicalIntegrityHeader::HierarchicalIntegrityHeader()
+nn::hac::HierarchicalIntegrityHeader::HierarchicalIntegrityHeader()
 {
 	clear();
 }
 
-nx::HierarchicalIntegrityHeader::HierarchicalIntegrityHeader(const HierarchicalIntegrityHeader & other)
+nn::hac::HierarchicalIntegrityHeader::HierarchicalIntegrityHeader(const HierarchicalIntegrityHeader & other)
 {
 	*this = other;
 }
 
-void nx::HierarchicalIntegrityHeader::operator=(const HierarchicalIntegrityHeader & other)
+void nn::hac::HierarchicalIntegrityHeader::operator=(const HierarchicalIntegrityHeader & other)
 {
 	if (other.getBytes().size() != 0)
 	{
@@ -25,33 +25,33 @@ void nx::HierarchicalIntegrityHeader::operator=(const HierarchicalIntegrityHeade
 	}
 }
 
-bool nx::HierarchicalIntegrityHeader::operator==(const HierarchicalIntegrityHeader & other) const
+bool nn::hac::HierarchicalIntegrityHeader::operator==(const HierarchicalIntegrityHeader & other) const
 {
 	return (mLayerInfo == other.mLayerInfo) \
 		&& (mMasterHashList == other.mMasterHashList);
 }
 
-bool nx::HierarchicalIntegrityHeader::operator!=(const HierarchicalIntegrityHeader & other) const
+bool nn::hac::HierarchicalIntegrityHeader::operator!=(const HierarchicalIntegrityHeader & other) const
 {
 	return !(*this == other);
 }
 
-void nx::HierarchicalIntegrityHeader::toBytes()
+void nn::hac::HierarchicalIntegrityHeader::toBytes()
 {
 	throw fnd::Exception(kModuleName, "exportBinary() not implemented");
 }
 
-void nx::HierarchicalIntegrityHeader::fromBytes(const byte_t* data, size_t len)
+void nn::hac::HierarchicalIntegrityHeader::fromBytes(const byte_t* data, size_t len)
 {
 	std::stringstream error_str;
 
 	// validate size for at least header
-	if (len < sizeof(nx::sHierarchicalIntegrityHeader))
+	if (len < sizeof(nn::hac::sHierarchicalIntegrityHeader))
 	{
 		throw fnd::Exception(kModuleName, "Header too small");
 	}
 
-	const nx::sHierarchicalIntegrityHeader* hdr = (const nx::sHierarchicalIntegrityHeader*)data;
+	const nn::hac::sHierarchicalIntegrityHeader* hdr = (const nn::hac::sHierarchicalIntegrityHeader*)data;
 
 	// Validate Header Sig "IVFC"
 	if (hdr->st_magic.get() != hierarchicalintegrity::kStructMagic)
@@ -60,7 +60,7 @@ void nx::HierarchicalIntegrityHeader::fromBytes(const byte_t* data, size_t len)
 	}
 
 	// Validate TypeId
-	if (hdr->type_id.get() != nx::hierarchicalintegrity::kRomfsTypeId)
+	if (hdr->type_id.get() != nn::hac::hierarchicalintegrity::kRomfsTypeId)
 	{
 		error_str.clear();
 		error_str << "Unsupported type id (" << std::hex << hdr->type_id.get() << ")";
@@ -72,12 +72,12 @@ void nx::HierarchicalIntegrityHeader::fromBytes(const byte_t* data, size_t len)
 	{
 		error_str.clear();
 		error_str << "Invalid layer count. ";
-		error_str << "(actual=" << std::dec << hdr->layer_num.get() << ", expected=" << nx::hierarchicalintegrity::kDefaultLayerNum+1 << ")";
+		error_str << "(actual=" << std::dec << hdr->layer_num.get() << ", expected=" << nn::hac::hierarchicalintegrity::kDefaultLayerNum+1 << ")";
 		throw fnd::Exception(kModuleName, error_str.str());
 	}
 	
 	// Get Sizes/Offsets
-	size_t master_hash_offset = align((sizeof(nx::sHierarchicalIntegrityHeader) + sizeof(nx::sHierarchicalIntegrityLayerInfo) * hdr->layer_num.get()), nx::hierarchicalintegrity::kHeaderAlignLen);
+	size_t master_hash_offset = align((sizeof(nn::hac::sHierarchicalIntegrityHeader) + sizeof(nn::hac::sHierarchicalIntegrityLayerInfo) * hdr->layer_num.get()), nn::hac::hierarchicalintegrity::kHeaderAlignLen);
 	size_t total_size = master_hash_offset + hdr->master_hash_size.get();
 
 	// Validate total size
@@ -91,7 +91,7 @@ void nx::HierarchicalIntegrityHeader::fromBytes(const byte_t* data, size_t len)
 	memcpy(mRawBinary.data(), data, mRawBinary.size());
 
 	// save layer info
-	const nx::sHierarchicalIntegrityLayerInfo* layer_info = (const nx::sHierarchicalIntegrityLayerInfo*)(mRawBinary.data() + sizeof(nx::sHierarchicalIntegrityHeader));
+	const nn::hac::sHierarchicalIntegrityLayerInfo* layer_info = (const nn::hac::sHierarchicalIntegrityLayerInfo*)(mRawBinary.data() + sizeof(nn::hac::sHierarchicalIntegrityHeader));
 	for (size_t i = 0; i < hierarchicalintegrity::kDefaultLayerNum; i++)
 	{
 		mLayerInfo.addElement({layer_info[i].offset.get(), layer_info[i].size.get(), layer_info[i].block_size.get()});
@@ -105,33 +105,33 @@ void nx::HierarchicalIntegrityHeader::fromBytes(const byte_t* data, size_t len)
 	}
 }
 
-const fnd::Vec<byte_t>& nx::HierarchicalIntegrityHeader::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::HierarchicalIntegrityHeader::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::HierarchicalIntegrityHeader::clear()
+void nn::hac::HierarchicalIntegrityHeader::clear()
 {
 	mLayerInfo.clear();
 	mMasterHashList.clear();
 }
 
-const fnd::List<nx::HierarchicalIntegrityHeader::sLayer>& nx::HierarchicalIntegrityHeader::getLayerInfo() const
+const fnd::List<nn::hac::HierarchicalIntegrityHeader::sLayer>& nn::hac::HierarchicalIntegrityHeader::getLayerInfo() const
 {
 	return mLayerInfo;
 }
 
-void nx::HierarchicalIntegrityHeader::setLayerInfo(const fnd::List<sLayer>& layer_info)
+void nn::hac::HierarchicalIntegrityHeader::setLayerInfo(const fnd::List<sLayer>& layer_info)
 {
 	mLayerInfo = layer_info;
 }
 
-const fnd::List<crypto::sha::sSha256Hash>& nx::HierarchicalIntegrityHeader::getMasterHashList() const
+const fnd::List<crypto::sha::sSha256Hash>& nn::hac::HierarchicalIntegrityHeader::getMasterHashList() const
 {
 	return mMasterHashList;
 }
 
-void nx::HierarchicalIntegrityHeader::setMasterHashList(const fnd::List<crypto::sha::sSha256Hash>& master_hash_list)
+void nn::hac::HierarchicalIntegrityHeader::setMasterHashList(const fnd::List<crypto::sha::sSha256Hash>& master_hash_list)
 {
 	mMasterHashList = master_hash_list;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/HierarchicalSha256Header.cpp b/lib/libhac/source/HierarchicalSha256Header.cpp
index e199075..6b3f42c 100644
--- a/lib/libhac/source/HierarchicalSha256Header.cpp
+++ b/lib/libhac/source/HierarchicalSha256Header.cpp
@@ -1,17 +1,17 @@
 #include <sstream>
-#include <nx/HierarchicalSha256Header.h>
+#include <nn/hac/HierarchicalSha256Header.h>
 
-nx::HierarchicalSha256Header::HierarchicalSha256Header()
+nn::hac::HierarchicalSha256Header::HierarchicalSha256Header()
 {
 	clear();
 }
 
-nx::HierarchicalSha256Header::HierarchicalSha256Header(const HierarchicalSha256Header & other)
+nn::hac::HierarchicalSha256Header::HierarchicalSha256Header(const HierarchicalSha256Header & other)
 {
 	*this = other;
 }
 
-void nx::HierarchicalSha256Header::operator=(const HierarchicalSha256Header & other)
+void nn::hac::HierarchicalSha256Header::operator=(const HierarchicalSha256Header & other)
 {
 	if (other.getBytes().size() != 0)
 	{
@@ -25,39 +25,39 @@ void nx::HierarchicalSha256Header::operator=(const HierarchicalSha256Header & ot
 	}
 }
 
-bool nx::HierarchicalSha256Header::operator==(const HierarchicalSha256Header & other) const
+bool nn::hac::HierarchicalSha256Header::operator==(const HierarchicalSha256Header & other) const
 {
 	return (mMasterHash == other.mMasterHash) \
 		&& (mHashBlockSize == other.mHashBlockSize) \
 		&& (mLayerInfo == other.mLayerInfo);
 }
 
-bool nx::HierarchicalSha256Header::operator!=(const HierarchicalSha256Header & other) const
+bool nn::hac::HierarchicalSha256Header::operator!=(const HierarchicalSha256Header & other) const
 {
 	return !(*this == other);
 }
 
-void nx::HierarchicalSha256Header::toBytes()
+void nn::hac::HierarchicalSha256Header::toBytes()
 {
 	throw fnd::Exception(kModuleName, "exportBinary() not implemented");
 }
 
-void nx::HierarchicalSha256Header::fromBytes(const byte_t* data, size_t len)
+void nn::hac::HierarchicalSha256Header::fromBytes(const byte_t* data, size_t len)
 {
 	std::stringstream error_str;
 
-	if (len < sizeof(nx::sHierarchicalSha256Header))
+	if (len < sizeof(nn::hac::sHierarchicalSha256Header))
 	{
 		throw fnd::Exception(kModuleName, "Header too small");
 	}
 
-	const nx::sHierarchicalSha256Header* hdr = (const nx::sHierarchicalSha256Header*)data;
+	const nn::hac::sHierarchicalSha256Header* hdr = (const nn::hac::sHierarchicalSha256Header*)data;
 
-	if (hdr->layer_num.get() != nx::hierarchicalsha256::kDefaultLayerNum)
+	if (hdr->layer_num.get() != nn::hac::hierarchicalsha256::kDefaultLayerNum)
 	{
 		error_str.clear();
 		error_str << "Invalid layer count. ";
-		error_str << "(actual=" << std::dec << hdr->layer_num.get() << ", expected=" << nx::hierarchicalsha256::kDefaultLayerNum << ")";
+		error_str << "(actual=" << std::dec << hdr->layer_num.get() << ", expected=" << nn::hac::hierarchicalsha256::kDefaultLayerNum << ")";
 		throw fnd::Exception(kModuleName, error_str.str());
 	}
 
@@ -69,44 +69,44 @@ void nx::HierarchicalSha256Header::fromBytes(const byte_t* data, size_t len)
 	}
 }
 
-const fnd::Vec<byte_t>& nx::HierarchicalSha256Header::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::HierarchicalSha256Header::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::HierarchicalSha256Header::clear()
+void nn::hac::HierarchicalSha256Header::clear()
 {
 	memset(mMasterHash.bytes, 0, sizeof(crypto::sha::sSha256Hash));
 	mHashBlockSize = 0;
 	mLayerInfo.clear();
 }
 
-const crypto::sha::sSha256Hash & nx::HierarchicalSha256Header::getMasterHash() const
+const crypto::sha::sSha256Hash & nn::hac::HierarchicalSha256Header::getMasterHash() const
 {
 	return mMasterHash;
 }
 
-void nx::HierarchicalSha256Header::setMasterHash(const crypto::sha::sSha256Hash & master_hash)
+void nn::hac::HierarchicalSha256Header::setMasterHash(const crypto::sha::sSha256Hash & master_hash)
 {
 	mMasterHash = master_hash;
 }
 
-size_t nx::HierarchicalSha256Header::getHashBlockSize() const
+size_t nn::hac::HierarchicalSha256Header::getHashBlockSize() const
 {
 	return mHashBlockSize;
 }
 
-void nx::HierarchicalSha256Header::setHashBlockSize(size_t hash_block_size)
+void nn::hac::HierarchicalSha256Header::setHashBlockSize(size_t hash_block_size)
 {
 	mHashBlockSize = hash_block_size;
 }
 
-const fnd::List<nx::HierarchicalSha256Header::sLayer>& nx::HierarchicalSha256Header::getLayerInfo() const
+const fnd::List<nn::hac::HierarchicalSha256Header::sLayer>& nn::hac::HierarchicalSha256Header::getLayerInfo() const
 {
 	return mLayerInfo;
 }
 
-void nx::HierarchicalSha256Header::setLayerInfo(const fnd::List<sLayer>& layer_info)
+void nn::hac::HierarchicalSha256Header::setLayerInfo(const fnd::List<sLayer>& layer_info)
 {
 	mLayerInfo = layer_info;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/InteruptEntry.cpp b/lib/libhac/source/InteruptEntry.cpp
index ef07c4f..188de53 100644
--- a/lib/libhac/source/InteruptEntry.cpp
+++ b/lib/libhac/source/InteruptEntry.cpp
@@ -1,20 +1,20 @@
-#include <nx/InteruptEntry.h>
+#include <nn/hac/InteruptEntry.h>
 
-nx::InteruptEntry::InteruptEntry() :
+nn::hac::InteruptEntry::InteruptEntry() :
 	mCap(kCapId),
 	mInterupt{0,0}
 {
 	
 }
 
-nx::InteruptEntry::InteruptEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::InteruptEntry::InteruptEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kCapId),
 	mInterupt{ 0,0 }
 {
 	setKernelCapability(kernel_cap);
 }
 
-nx::InteruptEntry::InteruptEntry(uint32_t interupt0, uint32_t interupt1) :
+nn::hac::InteruptEntry::InteruptEntry(uint32_t interupt0, uint32_t interupt1) :
 	mCap(kCapId),
 	mInterupt{ 0,0 }
 {
@@ -22,30 +22,30 @@ nx::InteruptEntry::InteruptEntry(uint32_t interupt0, uint32_t interupt1) :
 	setInterupt(1, interupt1);
 }
 
-void nx::InteruptEntry::operator=(const InteruptEntry& other)
+void nn::hac::InteruptEntry::operator=(const InteruptEntry& other)
 {
 	mInterupt[0] = other.mInterupt[0];
 	mInterupt[1] = other.mInterupt[1];
 	updateCapField();
 }
 
-bool nx::InteruptEntry::operator==(const InteruptEntry& other) const
+bool nn::hac::InteruptEntry::operator==(const InteruptEntry& other) const
 {
 	return (mInterupt[0] == other.mInterupt[0]) \
 		&& (mInterupt[1] == other.mInterupt[1]);
 }
 
-bool nx::InteruptEntry::operator!=(const InteruptEntry& other) const
+bool nn::hac::InteruptEntry::operator!=(const InteruptEntry& other) const
 {
 	return !(*this == other);
 }
 
-const nx::KernelCapabilityEntry & nx::InteruptEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::InteruptEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::InteruptEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::InteruptEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kCapId)
 	{
@@ -56,17 +56,17 @@ void nx::InteruptEntry::setKernelCapability(const KernelCapabilityEntry & kernel
 	processCapField();
 }
 
-uint32_t nx::InteruptEntry::operator[](size_t index) const
+uint32_t nn::hac::InteruptEntry::operator[](size_t index) const
 {
 	return getInterupt(index);
 }
 
-uint32_t nx::InteruptEntry::getInterupt(size_t index) const
+uint32_t nn::hac::InteruptEntry::getInterupt(size_t index) const
 {
 	return mInterupt[index % kInteruptNum];
 }
 
-void nx::InteruptEntry::setInterupt(size_t index, uint32_t interupt)
+void nn::hac::InteruptEntry::setInterupt(size_t index, uint32_t interupt)
 {
 	if (interupt > kInteruptMax)
 	{
diff --git a/lib/libhac/source/InteruptHandler.cpp b/lib/libhac/source/InteruptHandler.cpp
index b2e95f1..421ee19 100644
--- a/lib/libhac/source/InteruptHandler.cpp
+++ b/lib/libhac/source/InteruptHandler.cpp
@@ -1,28 +1,28 @@
-#include <nx/InteruptHandler.h>
+#include <nn/hac/InteruptHandler.h>
 
-nx::InteruptHandler::InteruptHandler() :
+nn::hac::InteruptHandler::InteruptHandler() :
 	mIsSet(false),
 	mInterupts()
 {}
 
-void nx::InteruptHandler::operator=(const InteruptHandler & other)
+void nn::hac::InteruptHandler::operator=(const InteruptHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mInterupts = other.mInterupts;
 }
 
-bool nx::InteruptHandler::operator==(const InteruptHandler & other) const
+bool nn::hac::InteruptHandler::operator==(const InteruptHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mInterupts == other.mInterupts);
 }
 
-bool nx::InteruptHandler::operator!=(const InteruptHandler & other) const
+bool nn::hac::InteruptHandler::operator!=(const InteruptHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::InteruptHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::InteruptHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() == 0)
 		return;
@@ -58,7 +58,7 @@ void nx::InteruptHandler::importKernelCapabilityList(const fnd::List<KernelCapab
 	mIsSet = true;
 }
 
-void nx::InteruptHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::InteruptHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -84,23 +84,23 @@ void nx::InteruptHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityE
 	}
 }
 
-void nx::InteruptHandler::clear()
+void nn::hac::InteruptHandler::clear()
 {
 	mIsSet = false;
 	mInterupts.clear();
 }
 
-bool nx::InteruptHandler::isSet() const
+bool nn::hac::InteruptHandler::isSet() const
 {
 	return mIsSet;
 }
 
-const fnd::List<uint16_t>& nx::InteruptHandler::getInteruptList() const
+const fnd::List<uint16_t>& nn::hac::InteruptHandler::getInteruptList() const
 {
 	return mInterupts;
 }
 
-void nx::InteruptHandler::setInteruptList(const fnd::List<uint16_t>& interupts)
+void nn::hac::InteruptHandler::setInteruptList(const fnd::List<uint16_t>& interupts)
 {
 	mInterupts.clear();
 	for (size_t i = 0; i < interupts.size(); i++)
diff --git a/lib/libhac/source/KernelCapabilityBinary.cpp b/lib/libhac/source/KernelCapabilityBinary.cpp
index 39f7425..71d5eed 100644
--- a/lib/libhac/source/KernelCapabilityBinary.cpp
+++ b/lib/libhac/source/KernelCapabilityBinary.cpp
@@ -1,14 +1,14 @@
-#include <nx/KernelCapabilityBinary.h>
+#include <nn/hac/KernelCapabilityBinary.h>
 
-nx::KernelCapabilityBinary::KernelCapabilityBinary()
+nn::hac::KernelCapabilityBinary::KernelCapabilityBinary()
 {}
 
-nx::KernelCapabilityBinary::KernelCapabilityBinary(const KernelCapabilityBinary & other)
+nn::hac::KernelCapabilityBinary::KernelCapabilityBinary(const KernelCapabilityBinary & other)
 {
 	*this = other;
 }
 
-void nx::KernelCapabilityBinary::operator=(const KernelCapabilityBinary & other)
+void nn::hac::KernelCapabilityBinary::operator=(const KernelCapabilityBinary & other)
 {
 	clear();
 	mThreadInfo = other.mThreadInfo;
@@ -21,7 +21,7 @@ void nx::KernelCapabilityBinary::operator=(const KernelCapabilityBinary & other)
 	mMiscFlags = other.mMiscFlags;
 }
 
-bool nx::KernelCapabilityBinary::operator==(const KernelCapabilityBinary & other) const
+bool nn::hac::KernelCapabilityBinary::operator==(const KernelCapabilityBinary & other) const
 {
 	return (mThreadInfo == other.mThreadInfo) \
 		&& (mSystemCalls == other.mSystemCalls) \
@@ -33,12 +33,12 @@ bool nx::KernelCapabilityBinary::operator==(const KernelCapabilityBinary & other
 		&& (mMiscFlags == other.mMiscFlags);
 }
 
-bool nx::KernelCapabilityBinary::operator!=(const KernelCapabilityBinary & other) const
+bool nn::hac::KernelCapabilityBinary::operator!=(const KernelCapabilityBinary & other) const
 {
 	return !(*this == other);
 }
 
-void nx::KernelCapabilityBinary::toBytes()
+void nn::hac::KernelCapabilityBinary::toBytes()
 {
 	fnd::List<KernelCapabilityEntry> caps;
 
@@ -63,7 +63,7 @@ void nx::KernelCapabilityBinary::toBytes()
 	}
 }
 
-void nx::KernelCapabilityBinary::fromBytes(const byte_t * data, size_t len)
+void nn::hac::KernelCapabilityBinary::fromBytes(const byte_t * data, size_t len)
 {
 	if ((len % sizeof(uint32_t)) != 0)
 	{
@@ -131,12 +131,12 @@ void nx::KernelCapabilityBinary::fromBytes(const byte_t * data, size_t len)
 	mMiscFlags.importKernelCapabilityList(miscFlagsCaps);
 }
 
-const fnd::Vec<byte_t>& nx::KernelCapabilityBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::KernelCapabilityBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::KernelCapabilityBinary::clear()
+void nn::hac::KernelCapabilityBinary::clear()
 {
 	mRawBinary.clear();
 	mThreadInfo.clear();
@@ -149,82 +149,82 @@ void nx::KernelCapabilityBinary::clear()
 	mMiscFlags.clear();
 }
 
-const nx::ThreadInfoHandler & nx::KernelCapabilityBinary::getThreadInfo() const
+const nn::hac::ThreadInfoHandler & nn::hac::KernelCapabilityBinary::getThreadInfo() const
 {
 	return mThreadInfo;
 }
 
-nx::ThreadInfoHandler & nx::KernelCapabilityBinary::getThreadInfo()
+nn::hac::ThreadInfoHandler & nn::hac::KernelCapabilityBinary::getThreadInfo()
 {
 	return mThreadInfo;
 }
 
-const nx::SystemCallHandler & nx::KernelCapabilityBinary::getSystemCalls() const
+const nn::hac::SystemCallHandler & nn::hac::KernelCapabilityBinary::getSystemCalls() const
 {
 	return mSystemCalls;
 }
 
-nx::SystemCallHandler & nx::KernelCapabilityBinary::getSystemCalls()
+nn::hac::SystemCallHandler & nn::hac::KernelCapabilityBinary::getSystemCalls()
 {
 	return mSystemCalls;
 }
 
-const nx::MemoryMappingHandler & nx::KernelCapabilityBinary::getMemoryMaps() const
+const nn::hac::MemoryMappingHandler & nn::hac::KernelCapabilityBinary::getMemoryMaps() const
 {
 	return mMemoryMap;
 }
 
-nx::MemoryMappingHandler & nx::KernelCapabilityBinary::getMemoryMaps()
+nn::hac::MemoryMappingHandler & nn::hac::KernelCapabilityBinary::getMemoryMaps()
 {
 	return mMemoryMap;
 }
 
-const nx::InteruptHandler & nx::KernelCapabilityBinary::getInterupts() const
+const nn::hac::InteruptHandler & nn::hac::KernelCapabilityBinary::getInterupts() const
 {
 	return mInterupts;
 }
 
-nx::InteruptHandler & nx::KernelCapabilityBinary::getInterupts()
+nn::hac::InteruptHandler & nn::hac::KernelCapabilityBinary::getInterupts()
 {
 	return mInterupts;
 }
 
-const nx::MiscParamsHandler & nx::KernelCapabilityBinary::getMiscParams() const
+const nn::hac::MiscParamsHandler & nn::hac::KernelCapabilityBinary::getMiscParams() const
 {
 	return mMiscParams;
 }
 
-nx::MiscParamsHandler & nx::KernelCapabilityBinary::getMiscParams()
+nn::hac::MiscParamsHandler & nn::hac::KernelCapabilityBinary::getMiscParams()
 {
 	return mMiscParams;
 }
 
-const nx::KernelVersionHandler & nx::KernelCapabilityBinary::getKernelVersion() const
+const nn::hac::KernelVersionHandler & nn::hac::KernelCapabilityBinary::getKernelVersion() const
 {
 	return mKernelVersion;
 }
 
-nx::KernelVersionHandler & nx::KernelCapabilityBinary::getKernelVersion()
+nn::hac::KernelVersionHandler & nn::hac::KernelCapabilityBinary::getKernelVersion()
 {
 	return mKernelVersion;
 }
 
-const nx::HandleTableSizeHandler & nx::KernelCapabilityBinary::getHandleTableSize() const
+const nn::hac::HandleTableSizeHandler & nn::hac::KernelCapabilityBinary::getHandleTableSize() const
 {
 	return mHandleTableSize;
 }
 
-nx::HandleTableSizeHandler & nx::KernelCapabilityBinary::getHandleTableSize()
+nn::hac::HandleTableSizeHandler & nn::hac::KernelCapabilityBinary::getHandleTableSize()
 {
 	return mHandleTableSize;
 }
 
-const nx::MiscFlagsHandler & nx::KernelCapabilityBinary::getMiscFlags() const
+const nn::hac::MiscFlagsHandler & nn::hac::KernelCapabilityBinary::getMiscFlags() const
 {
 	return mMiscFlags;
 }
 
-nx::MiscFlagsHandler & nx::KernelCapabilityBinary::getMiscFlags()
+nn::hac::MiscFlagsHandler & nn::hac::KernelCapabilityBinary::getMiscFlags()
 {
 	return mMiscFlags;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/KernelCapabilityEntry.cpp b/lib/libhac/source/KernelCapabilityEntry.cpp
index cbca030..7da3bf1 100644
--- a/lib/libhac/source/KernelCapabilityEntry.cpp
+++ b/lib/libhac/source/KernelCapabilityEntry.cpp
@@ -1,63 +1,63 @@
-#include <nx/KernelCapabilityEntry.h>
+#include <nn/hac/KernelCapabilityEntry.h>
 
-nx::KernelCapabilityEntry::KernelCapabilityEntry() :
+nn::hac::KernelCapabilityEntry::KernelCapabilityEntry() :
 	mType(kc::KC_INVALID)
 {}
 
-nx::KernelCapabilityEntry::KernelCapabilityEntry(kc::KernelCapId type) :
+nn::hac::KernelCapabilityEntry::KernelCapabilityEntry(kc::KernelCapId type) :
 	mType(type),
 	mField(0)
 {}
 
-nx::KernelCapabilityEntry::KernelCapabilityEntry(kc::KernelCapId type, uint32_t field) :
+nn::hac::KernelCapabilityEntry::KernelCapabilityEntry(kc::KernelCapId type, uint32_t field) :
 	mType(type),
 	mField(field)
 {}
 
-void nx::KernelCapabilityEntry::operator=(const KernelCapabilityEntry & other)
+void nn::hac::KernelCapabilityEntry::operator=(const KernelCapabilityEntry & other)
 {
 	mType = other.mType;
 	mField = other.mField;
 }
 
-bool nx::KernelCapabilityEntry::operator==(const KernelCapabilityEntry & other) const
+bool nn::hac::KernelCapabilityEntry::operator==(const KernelCapabilityEntry & other) const
 {
 	return (mType == other.mType) \
 		&& (mField == other.mField);
 }
 
-bool nx::KernelCapabilityEntry::operator!=(const KernelCapabilityEntry & other) const
+bool nn::hac::KernelCapabilityEntry::operator!=(const KernelCapabilityEntry & other) const
 {
 	return !operator==(other);
 }
 
-uint32_t nx::KernelCapabilityEntry::getCap() const
+uint32_t nn::hac::KernelCapabilityEntry::getCap() const
 {
 	return (mField & getFieldMask()) << getFieldShift() | getCapMask();
 }
 
-void nx::KernelCapabilityEntry::setCap(uint32_t cap)
+void nn::hac::KernelCapabilityEntry::setCap(uint32_t cap)
 {
 	mType = getCapId(cap);
 	mField = (cap >> getFieldShift()) & getFieldMask();
 }
 
-nx::kc::KernelCapId nx::KernelCapabilityEntry::getType() const
+nn::hac::kc::KernelCapId nn::hac::KernelCapabilityEntry::getType() const
 {
 	return mType;
 }
 
-void nx::KernelCapabilityEntry::setType(kc::KernelCapId type)
+void nn::hac::KernelCapabilityEntry::setType(kc::KernelCapId type)
 {
 	mType = type;
 }
 
-uint32_t nx::KernelCapabilityEntry::getField() const
+uint32_t nn::hac::KernelCapabilityEntry::getField() const
 {
 	return mField & getFieldMask();
 }
 
-void nx::KernelCapabilityEntry::setField(uint32_t field)
+void nn::hac::KernelCapabilityEntry::setField(uint32_t field)
 {
 	mField = field;
 }
diff --git a/lib/libhac/source/KernelVersionEntry.cpp b/lib/libhac/source/KernelVersionEntry.cpp
index efd07ab..98343d5 100644
--- a/lib/libhac/source/KernelVersionEntry.cpp
+++ b/lib/libhac/source/KernelVersionEntry.cpp
@@ -1,12 +1,12 @@
-#include <nx/KernelVersionEntry.h>
+#include <nn/hac/KernelVersionEntry.h>
 
-nx::KernelVersionEntry::KernelVersionEntry() :
+nn::hac::KernelVersionEntry::KernelVersionEntry() :
 	mCap(kCapId),
 	mVerMajor(0),
 	mVerMinor(0)
 {}
 
-nx::KernelVersionEntry::KernelVersionEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::KernelVersionEntry::KernelVersionEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kCapId),
 	mVerMajor(0),
 	mVerMinor(0)
@@ -14,7 +14,7 @@ nx::KernelVersionEntry::KernelVersionEntry(const KernelCapabilityEntry & kernel_
 	setKernelCapability(kernel_cap);
 }
 
-nx::KernelVersionEntry::KernelVersionEntry(uint16_t major, uint8_t minor) :
+nn::hac::KernelVersionEntry::KernelVersionEntry(uint16_t major, uint8_t minor) :
 	mCap(kCapId),
 	mVerMajor(0),
 	mVerMinor(0)
@@ -23,30 +23,30 @@ nx::KernelVersionEntry::KernelVersionEntry(uint16_t major, uint8_t minor) :
 	setVerMinor(minor);
 }
 
-void nx::KernelVersionEntry::operator=(const KernelVersionEntry& other)
+void nn::hac::KernelVersionEntry::operator=(const KernelVersionEntry& other)
 {
 	mVerMajor = other.mVerMajor;
 	mVerMinor = other.mVerMinor;
 	updateCapField();
 }
 
-bool nx::KernelVersionEntry::operator==(const KernelVersionEntry& other) const
+bool nn::hac::KernelVersionEntry::operator==(const KernelVersionEntry& other) const
 {
 	return (mVerMajor == other.mVerMajor) \
 		&& (mVerMinor == other.mVerMinor);
 }
 
-bool nx::KernelVersionEntry::operator!=(const KernelVersionEntry& other) const
+bool nn::hac::KernelVersionEntry::operator!=(const KernelVersionEntry& other) const
 {
 	return !(*this == other);
 }
 
-const nx::KernelCapabilityEntry & nx::KernelVersionEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::KernelVersionEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::KernelVersionEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::KernelVersionEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kCapId)
 	{
@@ -57,12 +57,12 @@ void nx::KernelVersionEntry::setKernelCapability(const KernelCapabilityEntry & k
 	processCapField();
 }
 
-uint16_t nx::KernelVersionEntry::getVerMajor() const
+uint16_t nn::hac::KernelVersionEntry::getVerMajor() const
 {
 	return mVerMajor;
 }
 
-void nx::KernelVersionEntry::setVerMajor(uint16_t major)
+void nn::hac::KernelVersionEntry::setVerMajor(uint16_t major)
 {
 	if (major > kVerMajorMax)
 	{
@@ -73,12 +73,12 @@ void nx::KernelVersionEntry::setVerMajor(uint16_t major)
 	updateCapField();
 }
 
-uint8_t nx::KernelVersionEntry::getVerMinor() const
+uint8_t nn::hac::KernelVersionEntry::getVerMinor() const
 {
 	return mVerMinor;
 }
 
-void nx::KernelVersionEntry::setVerMinor(uint8_t minor)
+void nn::hac::KernelVersionEntry::setVerMinor(uint8_t minor)
 {
 	if (minor > kVerMinorMax)
 	{
diff --git a/lib/libhac/source/KernelVersionHandler.cpp b/lib/libhac/source/KernelVersionHandler.cpp
index ee3e960..580fa6f 100644
--- a/lib/libhac/source/KernelVersionHandler.cpp
+++ b/lib/libhac/source/KernelVersionHandler.cpp
@@ -1,28 +1,28 @@
-#include <nx/KernelVersionHandler.h>
+#include <nn/hac/KernelVersionHandler.h>
 
-nx::KernelVersionHandler::KernelVersionHandler() :
+nn::hac::KernelVersionHandler::KernelVersionHandler() :
 	mIsSet(false),
 	mEntry(0,0)
 {}
 
-void nx::KernelVersionHandler::operator=(const KernelVersionHandler & other)
+void nn::hac::KernelVersionHandler::operator=(const KernelVersionHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mEntry.setKernelCapability(other.mEntry.getKernelCapability());
 }
 
-bool nx::KernelVersionHandler::operator==(const KernelVersionHandler & other) const
+bool nn::hac::KernelVersionHandler::operator==(const KernelVersionHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mEntry.getKernelCapability() == other.mEntry.getKernelCapability());
 }
 
-bool nx::KernelVersionHandler::operator!=(const KernelVersionHandler & other) const
+bool nn::hac::KernelVersionHandler::operator!=(const KernelVersionHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::KernelVersionHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::KernelVersionHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() > kMaxKernelCapNum)
 	{ 
@@ -37,7 +37,7 @@ void nx::KernelVersionHandler::importKernelCapabilityList(const fnd::List<Kernel
 	mIsSet = true;
 }
 
-void nx::KernelVersionHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::KernelVersionHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -45,35 +45,35 @@ void nx::KernelVersionHandler::exportKernelCapabilityList(fnd::List<KernelCapabi
 	caps.addElement(mEntry.getKernelCapability());
 }
 
-void nx::KernelVersionHandler::clear()
+void nn::hac::KernelVersionHandler::clear()
 {
 	mIsSet = false;
 	mEntry.setVerMajor(0);
 	mEntry.setVerMinor(0);
 }
 
-bool nx::KernelVersionHandler::isSet() const
+bool nn::hac::KernelVersionHandler::isSet() const
 {
 	return mIsSet;
 }
 
-uint16_t nx::KernelVersionHandler::getVerMajor() const
+uint16_t nn::hac::KernelVersionHandler::getVerMajor() const
 {
 	return mEntry.getVerMajor();
 }
 
-void nx::KernelVersionHandler::setVerMajor(uint16_t major)
+void nn::hac::KernelVersionHandler::setVerMajor(uint16_t major)
 {
 	mEntry.setVerMajor(major);
 	mIsSet = true;
 }
 
-uint8_t nx::KernelVersionHandler::getVerMinor() const
+uint8_t nn::hac::KernelVersionHandler::getVerMinor() const
 {
 	return mEntry.getVerMinor();
 }
 
-void nx::KernelVersionHandler::setVerMinor(uint8_t minor)
+void nn::hac::KernelVersionHandler::setVerMinor(uint8_t minor)
 {
 	mEntry.setVerMinor(minor);
 	mIsSet = true;
diff --git a/lib/libhac/source/MemoryMappingHandler.cpp b/lib/libhac/source/MemoryMappingHandler.cpp
index 4810f1b..6b12f36 100644
--- a/lib/libhac/source/MemoryMappingHandler.cpp
+++ b/lib/libhac/source/MemoryMappingHandler.cpp
@@ -1,30 +1,30 @@
-#include <nx/MemoryMappingHandler.h>
-#include <nx/MemoryPageEntry.h>
+#include <nn/hac/MemoryMappingHandler.h>
+#include <nn/hac/MemoryPageEntry.h>
 
-nx::MemoryMappingHandler::MemoryMappingHandler() :
+nn::hac::MemoryMappingHandler::MemoryMappingHandler() :
 	mIsSet(false)
 {}
 
-void nx::MemoryMappingHandler::operator=(const MemoryMappingHandler & other)
+void nn::hac::MemoryMappingHandler::operator=(const MemoryMappingHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mMemRange = other.mMemRange;
 	mMemPage = other.mMemPage;
 }
 
-bool nx::MemoryMappingHandler::operator==(const MemoryMappingHandler & other) const
+bool nn::hac::MemoryMappingHandler::operator==(const MemoryMappingHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mMemRange == other.mMemRange) \
 		&& (mMemPage == other.mMemPage);
 }
 
-bool nx::MemoryMappingHandler::operator!=(const MemoryMappingHandler & other) const
+bool nn::hac::MemoryMappingHandler::operator!=(const MemoryMappingHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::MemoryMappingHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::MemoryMappingHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() == 0)
 		return;
@@ -87,7 +87,7 @@ void nx::MemoryMappingHandler::importKernelCapabilityList(const fnd::List<Kernel
 	mIsSet = true;
 }
 
-void nx::MemoryMappingHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::MemoryMappingHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -116,24 +116,24 @@ void nx::MemoryMappingHandler::exportKernelCapabilityList(fnd::List<KernelCapabi
 	}
 }
 
-void nx::MemoryMappingHandler::clear()
+void nn::hac::MemoryMappingHandler::clear()
 {
 	mIsSet = false;
 	mMemRange.clear();
 	mMemPage.clear();
 }
 
-bool nx::MemoryMappingHandler::isSet() const
+bool nn::hac::MemoryMappingHandler::isSet() const
 {
 	return mIsSet;
 }
 
-const fnd::List<nx::MemoryMappingHandler::sMemoryMapping>& nx::MemoryMappingHandler::getMemoryMaps() const
+const fnd::List<nn::hac::MemoryMappingHandler::sMemoryMapping>& nn::hac::MemoryMappingHandler::getMemoryMaps() const
 {
 	return mMemRange;
 }
 
-const fnd::List<nx::MemoryMappingHandler::sMemoryMapping>& nx::MemoryMappingHandler::getIoMemoryMaps() const
+const fnd::List<nn::hac::MemoryMappingHandler::sMemoryMapping>& nn::hac::MemoryMappingHandler::getIoMemoryMaps() const
 {
 	return mMemPage;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/MemoryPageEntry.cpp b/lib/libhac/source/MemoryPageEntry.cpp
index 3b068e6..2277c09 100644
--- a/lib/libhac/source/MemoryPageEntry.cpp
+++ b/lib/libhac/source/MemoryPageEntry.cpp
@@ -1,13 +1,13 @@
-#include <nx/MemoryPageEntry.h>
+#include <nn/hac/MemoryPageEntry.h>
 
-nx::MemoryPageEntry::MemoryPageEntry() :
+nn::hac::MemoryPageEntry::MemoryPageEntry() :
 	mCap(kc::KC_INVALID),
 	mPage(0),
 	mFlag(false),
 	mUseFlag(false)
 {}
 
-nx::MemoryPageEntry::MemoryPageEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::MemoryPageEntry::MemoryPageEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kc::KC_INVALID),
 	mPage(0),
 	mFlag(false),
@@ -16,7 +16,7 @@ nx::MemoryPageEntry::MemoryPageEntry(const KernelCapabilityEntry & kernel_cap) :
 	setKernelCapability(kernel_cap);
 }
 
-nx::MemoryPageEntry::MemoryPageEntry(uint32_t page) :
+nn::hac::MemoryPageEntry::MemoryPageEntry(uint32_t page) :
 	mCap(kc::KC_INVALID),
 	mPage(0),
 	mFlag(false),
@@ -25,7 +25,7 @@ nx::MemoryPageEntry::MemoryPageEntry(uint32_t page) :
 	setPage(page);
 }
 
-nx::MemoryPageEntry::MemoryPageEntry(uint32_t page, bool flag) :
+nn::hac::MemoryPageEntry::MemoryPageEntry(uint32_t page, bool flag) :
 	mCap(kc::KC_INVALID),
 	mPage(0),
 	mFlag(false),
@@ -35,7 +35,7 @@ nx::MemoryPageEntry::MemoryPageEntry(uint32_t page, bool flag) :
 	setFlag(flag);
 }
 
-void nx::MemoryPageEntry::operator=(const MemoryPageEntry& other)
+void nn::hac::MemoryPageEntry::operator=(const MemoryPageEntry& other)
 {
 	mPage = other.mPage;
 	mFlag = other.mFlag;
@@ -43,24 +43,24 @@ void nx::MemoryPageEntry::operator=(const MemoryPageEntry& other)
 	updateCapField();
 }
 
-bool nx::MemoryPageEntry::operator==(const MemoryPageEntry& other) const
+bool nn::hac::MemoryPageEntry::operator==(const MemoryPageEntry& other) const
 {
 	return (mPage == other.mPage) \
 		&& (mFlag == other.mFlag) \
 		&& (mUseFlag == other.mUseFlag);
 }
 
-bool nx::MemoryPageEntry::operator!=(const MemoryPageEntry& other) const
+bool nn::hac::MemoryPageEntry::operator!=(const MemoryPageEntry& other) const
 {
 	return !(*this == other);
 }
 
-const nx::KernelCapabilityEntry & nx::MemoryPageEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::MemoryPageEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::MemoryPageEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::MemoryPageEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kc::KC_MEMORY_MAP && kernel_cap.getType() != kc::KC_IO_MEMORY_MAP)
 	{
@@ -71,12 +71,12 @@ void nx::MemoryPageEntry::setKernelCapability(const KernelCapabilityEntry & kern
 	processCapField();
 }
 
-uint32_t nx::MemoryPageEntry::getPage() const
+uint32_t nn::hac::MemoryPageEntry::getPage() const
 {
 	return mPage;
 }
 
-void nx::MemoryPageEntry::setPage(uint32_t page)
+void nn::hac::MemoryPageEntry::setPage(uint32_t page)
 {
 	if (page > kMaxPage)
 	{
@@ -87,23 +87,23 @@ void nx::MemoryPageEntry::setPage(uint32_t page)
 	updateCapField();
 }
 
-bool nx::MemoryPageEntry::getFlag() const
+bool nn::hac::MemoryPageEntry::getFlag() const
 {
 	return mFlag;
 }
 
-void nx::MemoryPageEntry::setFlag(bool flag)
+void nn::hac::MemoryPageEntry::setFlag(bool flag)
 {
 	mFlag = flag;
 	updateCapField();
 }
 
-bool nx::MemoryPageEntry::isMultiplePages() const
+bool nn::hac::MemoryPageEntry::isMultiplePages() const
 {
 	return mUseFlag;
 }
 
-void nx::MemoryPageEntry::setMapMultiplePages(bool useFlag)
+void nn::hac::MemoryPageEntry::setMapMultiplePages(bool useFlag)
 {
 	mUseFlag = useFlag;
 }
diff --git a/lib/libhac/source/MiscFlagsEntry.cpp b/lib/libhac/source/MiscFlagsEntry.cpp
index f0ac787..fe100ef 100644
--- a/lib/libhac/source/MiscFlagsEntry.cpp
+++ b/lib/libhac/source/MiscFlagsEntry.cpp
@@ -1,46 +1,46 @@
-#include <nx/MiscFlagsEntry.h>
+#include <nn/hac/MiscFlagsEntry.h>
 
-nx::MiscFlagsEntry::MiscFlagsEntry() :
+nn::hac::MiscFlagsEntry::MiscFlagsEntry() :
 	mCap(kCapId),
 	mFlags(0)
 {}
 
-nx::MiscFlagsEntry::MiscFlagsEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::MiscFlagsEntry::MiscFlagsEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kCapId),
 	mFlags(0)
 {
 	setKernelCapability(kernel_cap);
 }
 
-nx::MiscFlagsEntry::MiscFlagsEntry(uint32_t flags) :
+nn::hac::MiscFlagsEntry::MiscFlagsEntry(uint32_t flags) :
 	mCap(kCapId),
 	mFlags(0)
 {
 	setFlags(flags);
 }
 
-void nx::MiscFlagsEntry::operator=(const MiscFlagsEntry& other)
+void nn::hac::MiscFlagsEntry::operator=(const MiscFlagsEntry& other)
 {
 	mFlags = other.mFlags;
 	updateCapField();
 }
 
-bool nx::MiscFlagsEntry::operator==(const MiscFlagsEntry& other) const
+bool nn::hac::MiscFlagsEntry::operator==(const MiscFlagsEntry& other) const
 {
 	return (mFlags == other.mFlags);
 }
 
-bool nx::MiscFlagsEntry::operator!=(const MiscFlagsEntry& other) const
+bool nn::hac::MiscFlagsEntry::operator!=(const MiscFlagsEntry& other) const
 {
 	return !(*this == other);
 }
 
-const nx::KernelCapabilityEntry & nx::MiscFlagsEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::MiscFlagsEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::MiscFlagsEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::MiscFlagsEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kCapId)
 	{
@@ -51,12 +51,12 @@ void nx::MiscFlagsEntry::setKernelCapability(const KernelCapabilityEntry & kerne
 	processCapField();
 }
 
-uint32_t nx::MiscFlagsEntry::getFlags() const
+uint32_t nn::hac::MiscFlagsEntry::getFlags() const
 {
 	return mFlags;
 }
 
-void nx::MiscFlagsEntry::setFlags(uint32_t flags)
+void nn::hac::MiscFlagsEntry::setFlags(uint32_t flags)
 {
 	if ((flags & ~kMaxVal) != 0)
 	{
diff --git a/lib/libhac/source/MiscFlagsHandler.cpp b/lib/libhac/source/MiscFlagsHandler.cpp
index d608b4b..bb9a961 100644
--- a/lib/libhac/source/MiscFlagsHandler.cpp
+++ b/lib/libhac/source/MiscFlagsHandler.cpp
@@ -1,27 +1,27 @@
-#include <nx/MiscFlagsHandler.h>
+#include <nn/hac/MiscFlagsHandler.h>
 
-nx::MiscFlagsHandler::MiscFlagsHandler() :
+nn::hac::MiscFlagsHandler::MiscFlagsHandler() :
 	mIsSet(false)
 {}
 
-void nx::MiscFlagsHandler::operator=(const MiscFlagsHandler & other)
+void nn::hac::MiscFlagsHandler::operator=(const MiscFlagsHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mFlags = other.mFlags;
 }
 
-bool nx::MiscFlagsHandler::operator==(const MiscFlagsHandler & other) const
+bool nn::hac::MiscFlagsHandler::operator==(const MiscFlagsHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mFlags == other.mFlags);
 }
 
-bool nx::MiscFlagsHandler::operator!=(const MiscFlagsHandler & other) const
+bool nn::hac::MiscFlagsHandler::operator!=(const MiscFlagsHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::MiscFlagsHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::MiscFlagsHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() > kMaxKernelCapNum)
 	{
@@ -46,7 +46,7 @@ void nx::MiscFlagsHandler::importKernelCapabilityList(const fnd::List<KernelCapa
 	mIsSet = true;
 }
 
-void nx::MiscFlagsHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::MiscFlagsHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -66,23 +66,23 @@ void nx::MiscFlagsHandler::exportKernelCapabilityList(fnd::List<KernelCapability
 	caps.addElement(entry.getKernelCapability());
 }
 
-void nx::MiscFlagsHandler::clear()
+void nn::hac::MiscFlagsHandler::clear()
 {
 	mIsSet = false;
 	mFlags.clear();
 }
 
-bool nx::MiscFlagsHandler::isSet() const
+bool nn::hac::MiscFlagsHandler::isSet() const
 {
 	return mIsSet;
 }
 
-const fnd::List<nx::MiscFlagsHandler::Flags>& nx::MiscFlagsHandler::getFlagList() const
+const fnd::List<nn::hac::MiscFlagsHandler::Flags>& nn::hac::MiscFlagsHandler::getFlagList() const
 {
 	return mFlags;
 }
 
-void nx::MiscFlagsHandler::setFlagList(fnd::List<Flags> flags)
+void nn::hac::MiscFlagsHandler::setFlagList(fnd::List<Flags> flags)
 {
 	mFlags = flags;
 	mIsSet = true;
diff --git a/lib/libhac/source/MiscParamsEntry.cpp b/lib/libhac/source/MiscParamsEntry.cpp
index 28af0df..f9a14cb 100644
--- a/lib/libhac/source/MiscParamsEntry.cpp
+++ b/lib/libhac/source/MiscParamsEntry.cpp
@@ -1,46 +1,46 @@
-#include <nx/MiscParamsEntry.h>
+#include <nn/hac/MiscParamsEntry.h>
 
-nx::MiscParamsEntry::MiscParamsEntry() :
+nn::hac::MiscParamsEntry::MiscParamsEntry() :
 	mCap(kCapId),
 	mProgramType(0)
 {}
 
-nx::MiscParamsEntry::MiscParamsEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::MiscParamsEntry::MiscParamsEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kCapId),
 	mProgramType(0)
 {
 	setKernelCapability(kernel_cap);
 }
 
-nx::MiscParamsEntry::MiscParamsEntry(uint8_t program_type) :
+nn::hac::MiscParamsEntry::MiscParamsEntry(uint8_t program_type) :
 	mCap(kCapId),
 	mProgramType(0)
 {
 	setProgramType(program_type);
 }
 
-void nx::MiscParamsEntry::operator=(const MiscParamsEntry& other)
+void nn::hac::MiscParamsEntry::operator=(const MiscParamsEntry& other)
 {
 	mProgramType = other.mProgramType;
 	updateCapField();
 }
 
-bool nx::MiscParamsEntry::operator==(const MiscParamsEntry& other) const
+bool nn::hac::MiscParamsEntry::operator==(const MiscParamsEntry& other) const
 {
 	return (mProgramType == other.mProgramType);
 }
 
-bool nx::MiscParamsEntry::operator!=(const MiscParamsEntry& other) const
+bool nn::hac::MiscParamsEntry::operator!=(const MiscParamsEntry& other) const
 {
 	return !(*this == other);
 }
 
-const nx::KernelCapabilityEntry & nx::MiscParamsEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::MiscParamsEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::MiscParamsEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::MiscParamsEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kCapId)
 	{
@@ -51,12 +51,12 @@ void nx::MiscParamsEntry::setKernelCapability(const KernelCapabilityEntry & kern
 	processCapField();
 }
 
-uint8_t nx::MiscParamsEntry::getProgramType() const
+uint8_t nn::hac::MiscParamsEntry::getProgramType() const
 {
 	return mProgramType;
 }
 
-void nx::MiscParamsEntry::setProgramType(uint8_t type)
+void nn::hac::MiscParamsEntry::setProgramType(uint8_t type)
 {
 	if (type > kMaxProgramType)
 	{
diff --git a/lib/libhac/source/MiscParamsHandler.cpp b/lib/libhac/source/MiscParamsHandler.cpp
index 3d59650..d7bc863 100644
--- a/lib/libhac/source/MiscParamsHandler.cpp
+++ b/lib/libhac/source/MiscParamsHandler.cpp
@@ -1,28 +1,28 @@
-#include <nx/MiscParamsHandler.h>
+#include <nn/hac/MiscParamsHandler.h>
 
-nx::MiscParamsHandler::MiscParamsHandler() :
+nn::hac::MiscParamsHandler::MiscParamsHandler() :
 	mIsSet(false),
 	mEntry(0)
 {}
 
-void nx::MiscParamsHandler::operator=(const MiscParamsHandler & other)
+void nn::hac::MiscParamsHandler::operator=(const MiscParamsHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mEntry.setKernelCapability(other.mEntry.getKernelCapability());
 }
 
-bool nx::MiscParamsHandler::operator==(const MiscParamsHandler & other) const
+bool nn::hac::MiscParamsHandler::operator==(const MiscParamsHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mEntry.getKernelCapability() == other.mEntry.getKernelCapability());
 }
 
-bool nx::MiscParamsHandler::operator!=(const MiscParamsHandler & other) const
+bool nn::hac::MiscParamsHandler::operator!=(const MiscParamsHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::MiscParamsHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::MiscParamsHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() > kMaxKernelCapNum)
 	{
@@ -37,7 +37,7 @@ void nx::MiscParamsHandler::importKernelCapabilityList(const fnd::List<KernelCap
 	mIsSet = true;
 }
 
-void nx::MiscParamsHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::MiscParamsHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -45,23 +45,23 @@ void nx::MiscParamsHandler::exportKernelCapabilityList(fnd::List<KernelCapabilit
 	caps.addElement(mEntry.getKernelCapability());
 }
 
-void nx::MiscParamsHandler::clear()
+void nn::hac::MiscParamsHandler::clear()
 {
 	mIsSet = false;
 	mEntry.setProgramType(0);
 }
 
-bool nx::MiscParamsHandler::isSet() const
+bool nn::hac::MiscParamsHandler::isSet() const
 {
 	return mIsSet;
 }
 
-uint8_t nx::MiscParamsHandler::getProgramType() const
+uint8_t nn::hac::MiscParamsHandler::getProgramType() const
 {
 	return mEntry.getProgramType();
 }
 
-void nx::MiscParamsHandler::setProgramType(uint8_t type)
+void nn::hac::MiscParamsHandler::setProgramType(uint8_t type)
 {
 	mEntry.setProgramType(type);
 	mIsSet = true;
diff --git a/lib/libhac/source/NcaHeader.cpp b/lib/libhac/source/NcaHeader.cpp
index d41437e..4a546da 100644
--- a/lib/libhac/source/NcaHeader.cpp
+++ b/lib/libhac/source/NcaHeader.cpp
@@ -1,16 +1,16 @@
-#include <nx/NcaHeader.h>
+#include <nn/hac/NcaHeader.h>
 
-nx::NcaHeader::NcaHeader()
+nn::hac::NcaHeader::NcaHeader()
 {
 	clear();
 }
 
-nx::NcaHeader::NcaHeader(const NcaHeader & other)
+nn::hac::NcaHeader::NcaHeader(const NcaHeader & other)
 {
 	*this = other;
 }
 
-bool nx::NcaHeader::operator==(const NcaHeader & other) const
+bool nn::hac::NcaHeader::operator==(const NcaHeader & other) const
 {
 	return (mDistributionType == other.mDistributionType) \
 		&& (mContentType == other.mContentType) \
@@ -24,12 +24,12 @@ bool nx::NcaHeader::operator==(const NcaHeader & other) const
 		&& (mEncAesKeys == other.mEncAesKeys);
 }
 
-bool nx::NcaHeader::operator!=(const NcaHeader & other) const
+bool nn::hac::NcaHeader::operator!=(const NcaHeader & other) const
 {
 	return !(*this == other);
 }
 
-void nx::NcaHeader::operator=(const NcaHeader & other)
+void nn::hac::NcaHeader::operator=(const NcaHeader & other)
 {
 	if (other.getBytes().size())
 	{
@@ -51,7 +51,7 @@ void nx::NcaHeader::operator=(const NcaHeader & other)
 	}
 }
 
-void nx::NcaHeader::toBytes()
+void nn::hac::NcaHeader::toBytes()
 {
 	mRawBinary.alloc(sizeof(sNcaHeader));
 	sNcaHeader* hdr = (sNcaHeader*)mRawBinary.data();
@@ -108,7 +108,7 @@ void nx::NcaHeader::toBytes()
 	}
 }
 
-void nx::NcaHeader::fromBytes(const byte_t * data, size_t len)
+void nn::hac::NcaHeader::fromBytes(const byte_t * data, size_t len)
 {
 	if (len < sizeof(sNcaHeader))
 	{
@@ -158,12 +158,12 @@ void nx::NcaHeader::fromBytes(const byte_t * data, size_t len)
 	}
 }
 
-const fnd::Vec<byte_t>& nx::NcaHeader::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::NcaHeader::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::NcaHeader::clear()
+void nn::hac::NcaHeader::clear()
 {
 	mFormatVersion = NCA3_FORMAT;
 	mDistributionType = nca::DIST_DOWNLOAD;
@@ -179,97 +179,97 @@ void nx::NcaHeader::clear()
 	mEncAesKeys.clear();
 }
 
-nx::NcaHeader::FormatVersion nx::NcaHeader::getFormatVersion() const
+nn::hac::NcaHeader::FormatVersion nn::hac::NcaHeader::getFormatVersion() const
 {
 	return mFormatVersion;
 }
 
-void nx::NcaHeader::setFormatVersion(FormatVersion version)
+void nn::hac::NcaHeader::setFormatVersion(FormatVersion version)
 {
 	mFormatVersion = version;
 }
 
-nx::nca::DistributionType nx::NcaHeader::getDistributionType() const
+nn::hac::nca::DistributionType nn::hac::NcaHeader::getDistributionType() const
 {
 	return mDistributionType;
 }
 
-void nx::NcaHeader::setDistributionType(nca::DistributionType type)
+void nn::hac::NcaHeader::setDistributionType(nca::DistributionType type)
 {
 	mDistributionType = type;
 }
 
-nx::nca::ContentType nx::NcaHeader::getContentType() const
+nn::hac::nca::ContentType nn::hac::NcaHeader::getContentType() const
 {
 	return mContentType;
 }
 
-void nx::NcaHeader::setContentType(nca::ContentType type)
+void nn::hac::NcaHeader::setContentType(nca::ContentType type)
 {
 	mContentType = type;
 }
 
-byte_t nx::NcaHeader::getKeyGeneration() const
+byte_t nn::hac::NcaHeader::getKeyGeneration() const
 {
 	return mKeyGeneration;
 }
 
-void nx::NcaHeader::setKeyGeneration(byte_t gen)
+void nn::hac::NcaHeader::setKeyGeneration(byte_t gen)
 {
 	mKeyGeneration = gen;
 }
 
-byte_t nx::NcaHeader::getKaekIndex() const
+byte_t nn::hac::NcaHeader::getKaekIndex() const
 {
 	return mKaekIndex;
 }
 
-void nx::NcaHeader::setKaekIndex(byte_t index)
+void nn::hac::NcaHeader::setKaekIndex(byte_t index)
 {
 	mKaekIndex = index;
 }
 
-uint64_t nx::NcaHeader::getContentSize() const
+uint64_t nn::hac::NcaHeader::getContentSize() const
 {
 	return mContentSize;
 }
 
-void nx::NcaHeader::setContentSize(uint64_t size)
+void nn::hac::NcaHeader::setContentSize(uint64_t size)
 {
 	mContentSize = size;
 }
 
-uint64_t nx::NcaHeader::getProgramId() const
+uint64_t nn::hac::NcaHeader::getProgramId() const
 {
 	return mProgramId;
 }
 
-void nx::NcaHeader::setProgramId(uint64_t program_id)
+void nn::hac::NcaHeader::setProgramId(uint64_t program_id)
 {
 	mProgramId = program_id;
 }
 
-uint32_t nx::NcaHeader::getContentIndex() const
+uint32_t nn::hac::NcaHeader::getContentIndex() const
 {
 	return mContentIndex;
 }
 
-void nx::NcaHeader::setContentIndex(uint32_t index)
+void nn::hac::NcaHeader::setContentIndex(uint32_t index)
 {
 	mContentIndex = index;
 }
 
-uint32_t nx::NcaHeader::getSdkAddonVersion() const
+uint32_t nn::hac::NcaHeader::getSdkAddonVersion() const
 {
 	return mSdkAddonVersion;
 }
 
-void nx::NcaHeader::setSdkAddonVersion(uint32_t version)
+void nn::hac::NcaHeader::setSdkAddonVersion(uint32_t version)
 {
 	mSdkAddonVersion = version;
 }
 
-bool nx::NcaHeader::hasRightsId() const
+bool nn::hac::NcaHeader::hasRightsId() const
 {
 	bool rightsIdIsSet = false;
 
@@ -282,22 +282,22 @@ bool nx::NcaHeader::hasRightsId() const
 	return rightsIdIsSet;
 }
 
-const byte_t* nx::NcaHeader::getRightsId() const
+const byte_t* nn::hac::NcaHeader::getRightsId() const
 {
 	return mRightsId;
 }
 
-void nx::NcaHeader::setRightsId(const byte_t* rights_id)
+void nn::hac::NcaHeader::setRightsId(const byte_t* rights_id)
 {
 	memcpy(mRightsId, rights_id, nca::kRightsIdLen);
 }
 
-const fnd::List<nx::NcaHeader::sPartition>& nx::NcaHeader::getPartitions() const
+const fnd::List<nn::hac::NcaHeader::sPartition>& nn::hac::NcaHeader::getPartitions() const
 {
 	return mPartitions;
 }
 
-void nx::NcaHeader::setPartitions(const fnd::List<nx::NcaHeader::sPartition>& partitions)
+void nn::hac::NcaHeader::setPartitions(const fnd::List<nn::hac::NcaHeader::sPartition>& partitions)
 {
 	mPartitions = partitions;
 	if (mPartitions.size() >= nca::kPartitionNum)
@@ -306,22 +306,22 @@ void nx::NcaHeader::setPartitions(const fnd::List<nx::NcaHeader::sPartition>& pa
 	}
 }
 
-const fnd::List<crypto::aes::sAes128Key>& nx::NcaHeader::getEncAesKeys() const
+const fnd::List<crypto::aes::sAes128Key>& nn::hac::NcaHeader::getEncAesKeys() const
 {
 	return mEncAesKeys;
 }
 
-void nx::NcaHeader::setEncAesKeys(const fnd::List<crypto::aes::sAes128Key>& keys)
+void nn::hac::NcaHeader::setEncAesKeys(const fnd::List<crypto::aes::sAes128Key>& keys)
 {
 	mEncAesKeys = keys;
 }
 
-uint64_t nx::NcaHeader::blockNumToSize(uint32_t block_num) const
+uint64_t nn::hac::NcaHeader::blockNumToSize(uint32_t block_num) const
 {
 	return block_num*nca::kSectorSize;
 }
 
-uint32_t nx::NcaHeader::sizeToBlockNum(uint64_t real_size) const
+uint32_t nn::hac::NcaHeader::sizeToBlockNum(uint64_t real_size) const
 {
 	return (uint32_t)(align(real_size, nca::kSectorSize) / nca::kSectorSize);
 }
\ No newline at end of file
diff --git a/lib/libhac/source/NcaUtils.cpp b/lib/libhac/source/NcaUtils.cpp
index 5ec75c2..12f78c1 100644
--- a/lib/libhac/source/NcaUtils.cpp
+++ b/lib/libhac/source/NcaUtils.cpp
@@ -1,25 +1,25 @@
-#include <nx/NcaUtils.h>
+#include <nn/hac/NcaUtils.h>
 
-void nx::NcaUtils::decryptNcaHeader(const byte_t* src, byte_t* dst, const crypto::aes::sAesXts128Key& key)
+void nn::hac::NcaUtils::decryptNcaHeader(const byte_t* src, byte_t* dst, const crypto::aes::sAesXts128Key& key)
 {
 	byte_t tweak[crypto::aes::kAesBlockSize];
 
 	// decrypt main header
-	byte_t raw_hdr[nx::nca::kSectorSize];
+	byte_t raw_hdr[nn::hac::nca::kSectorSize];
 	crypto::aes::AesXtsMakeTweak(tweak, 1);
-	crypto::aes::AesXtsDecryptSector(src + sectorToOffset(1), nx::nca::kSectorSize, key.key[0], key.key[1], tweak, raw_hdr);
+	crypto::aes::AesXtsDecryptSector(src + sectorToOffset(1), nn::hac::nca::kSectorSize, key.key[0], key.key[1], tweak, raw_hdr);
 
-	bool useNca2SectorIndex = ((nx::sNcaHeader*)(raw_hdr))->st_magic.get() == nx::nca::kNca2StructMagic;
+	bool useNca2SectorIndex = ((nn::hac::sNcaHeader*)(raw_hdr))->st_magic.get() == nn::hac::nca::kNca2StructMagic;
 
 	// decrypt whole header
-	for (size_t i = 0; i < nx::nca::kHeaderSectorNum; i++)
+	for (size_t i = 0; i < nn::hac::nca::kHeaderSectorNum; i++)
 	{
 		crypto::aes::AesXtsMakeTweak(tweak, (i > 1 && useNca2SectorIndex)? 0 : i);
-		crypto::aes::AesXtsDecryptSector(src + sectorToOffset(i), nx::nca::kSectorSize, key.key[0], key.key[1], tweak, dst + sectorToOffset(i));
+		crypto::aes::AesXtsDecryptSector(src + sectorToOffset(i), nn::hac::nca::kSectorSize, key.key[0], key.key[1], tweak, dst + sectorToOffset(i));
 	}
 }
 
-byte_t nx::NcaUtils::getMasterKeyRevisionFromKeyGeneration(byte_t key_generation)
+byte_t nn::hac::NcaUtils::getMasterKeyRevisionFromKeyGeneration(byte_t key_generation)
 {
 	byte_t masterkey_rev;
 
@@ -48,7 +48,7 @@ byte_t nx::NcaUtils::getMasterKeyRevisionFromKeyGeneration(byte_t key_generation
 	return masterkey_rev;
 }
 
-void nx::NcaUtils::getNcaPartitionAesCtr(const nx::sNcaFsHeader* hdr, byte_t* ctr)
+void nn::hac::NcaUtils::getNcaPartitionAesCtr(const nn::hac::sNcaFsHeader* hdr, byte_t* ctr)
 {
 	for (size_t i = 0; i < 8; i++)
 	{
diff --git a/lib/libhac/source/NpdmBinary.cpp b/lib/libhac/source/NpdmBinary.cpp
index 0d88e53..716cc08 100644
--- a/lib/libhac/source/NpdmBinary.cpp
+++ b/lib/libhac/source/NpdmBinary.cpp
@@ -1,19 +1,19 @@
-#include <nx/NpdmBinary.h>
+#include <nn/hac/NpdmBinary.h>
 
 #include <fnd/SimpleTextOutput.h>
 
-nx::NpdmBinary::NpdmBinary()
+nn::hac::NpdmBinary::NpdmBinary()
 {
 	clear();
 }
 
-nx::NpdmBinary::NpdmBinary(const NpdmBinary & other) :
+nn::hac::NpdmBinary::NpdmBinary(const NpdmBinary & other) :
 	NpdmBinary()
 {
 	*this = other;
 }
 
-void nx::NpdmBinary::operator=(const NpdmBinary & other)
+void nn::hac::NpdmBinary::operator=(const NpdmBinary & other)
 {
 	mRawBinary = other.mRawBinary;
 	mInstructionType = other.mInstructionType;
@@ -28,7 +28,7 @@ void nx::NpdmBinary::operator=(const NpdmBinary & other)
 	mAcid = other.mAcid;
 }
 
-bool nx::NpdmBinary::operator==(const NpdmBinary & other) const
+bool nn::hac::NpdmBinary::operator==(const NpdmBinary & other) const
 {
 	return (mInstructionType == other.mInstructionType) \
 		&& (mProcAddressSpaceType == other.mProcAddressSpaceType) \
@@ -42,12 +42,12 @@ bool nx::NpdmBinary::operator==(const NpdmBinary & other) const
 		&& (mAcid == other.mAcid);
 }
 
-bool nx::NpdmBinary::operator!=(const NpdmBinary & other) const
+bool nn::hac::NpdmBinary::operator!=(const NpdmBinary & other) const
 {
 	return !(*this == other);
 }
 
-void nx::NpdmBinary::toBytes()
+void nn::hac::NpdmBinary::toBytes()
 {
 	if (mAcid.getBytes().size() == 0)
 		mAcid.toBytes();
@@ -103,7 +103,7 @@ void nx::NpdmBinary::toBytes()
 	}
 }
 
-void nx::NpdmBinary::fromBytes(const byte_t* data, size_t len)
+void nn::hac::NpdmBinary::fromBytes(const byte_t* data, size_t len)
 {
 	// check size
 	if (len < sizeof(sNpdmHeader))
@@ -167,12 +167,12 @@ void nx::NpdmBinary::fromBytes(const byte_t* data, size_t len)
 	}	
 }
 
-const fnd::Vec<byte_t>& nx::NpdmBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::NpdmBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::NpdmBinary::clear()
+void nn::hac::NpdmBinary::clear()
 {
 	mRawBinary.clear();
 	mInstructionType = npdm::INSTR_64BIT;
@@ -187,32 +187,32 @@ void nx::NpdmBinary::clear()
 	mAcid.clear();
 }
 
-nx::npdm::InstructionType nx::NpdmBinary::getInstructionType() const
+nn::hac::npdm::InstructionType nn::hac::NpdmBinary::getInstructionType() const
 {
 	return mInstructionType;
 }
 
-void nx::NpdmBinary::setInstructionType(npdm::InstructionType type)
+void nn::hac::NpdmBinary::setInstructionType(npdm::InstructionType type)
 {
 	mInstructionType = type;
 }
 
-nx::npdm::ProcAddrSpaceType nx::NpdmBinary::getProcAddressSpaceType() const
+nn::hac::npdm::ProcAddrSpaceType nn::hac::NpdmBinary::getProcAddressSpaceType() const
 {
 	return mProcAddressSpaceType;
 }
 
-void nx::NpdmBinary::setProcAddressSpaceType(npdm::ProcAddrSpaceType type)
+void nn::hac::NpdmBinary::setProcAddressSpaceType(npdm::ProcAddrSpaceType type)
 {
 	mProcAddressSpaceType = type;
 }
 
-byte_t nx::NpdmBinary::getMainThreadPriority() const
+byte_t nn::hac::NpdmBinary::getMainThreadPriority() const
 {
 	return mMainThreadPriority;
 }
 
-void nx::NpdmBinary::setMainThreadPriority(byte_t priority)
+void nn::hac::NpdmBinary::setMainThreadPriority(byte_t priority)
 {
 	if (priority > npdm::kMaxPriority)
 	{
@@ -222,42 +222,42 @@ void nx::NpdmBinary::setMainThreadPriority(byte_t priority)
 	mMainThreadPriority = priority;
 }
 
-byte_t nx::NpdmBinary::getMainThreadCpuId() const
+byte_t nn::hac::NpdmBinary::getMainThreadCpuId() const
 {
 	return mMainThreadCpuId;
 }
 
-void nx::NpdmBinary::setMainThreadCpuId(byte_t core_num)
+void nn::hac::NpdmBinary::setMainThreadCpuId(byte_t core_num)
 {
 	mMainThreadCpuId = core_num;
 }
 
-uint32_t nx::NpdmBinary::getVersion() const
+uint32_t nn::hac::NpdmBinary::getVersion() const
 {
 	return mVersion;
 }
 
-void nx::NpdmBinary::setVersion(uint32_t version)
+void nn::hac::NpdmBinary::setVersion(uint32_t version)
 {
 	mVersion = version;
 }
 
-uint32_t nx::NpdmBinary::getMainThreadStackSize() const
+uint32_t nn::hac::NpdmBinary::getMainThreadStackSize() const
 {
 	return mMainThreadStackSize;
 }
 
-void nx::NpdmBinary::setMainThreadStackSize(uint32_t size)
+void nn::hac::NpdmBinary::setMainThreadStackSize(uint32_t size)
 {
 	mMainThreadStackSize = size;
 }
 
-const std::string & nx::NpdmBinary::getName() const
+const std::string & nn::hac::NpdmBinary::getName() const
 {
 	return mName;
 }
 
-void nx::NpdmBinary::setName(const std::string & name)
+void nn::hac::NpdmBinary::setName(const std::string & name)
 {
 	if (name.length() > npdm::kNameMaxLen)
 	{
@@ -267,12 +267,12 @@ void nx::NpdmBinary::setName(const std::string & name)
 	mName = name;
 }
 
-const std::string & nx::NpdmBinary::getProductCode() const
+const std::string & nn::hac::NpdmBinary::getProductCode() const
 {
 	return mProductCode;
 }
 
-void nx::NpdmBinary::setProductCode(const std::string & product_code)
+void nn::hac::NpdmBinary::setProductCode(const std::string & product_code)
 {
 	if (product_code.length() > npdm::kProductCodeMaxLen)
 	{
@@ -282,22 +282,22 @@ void nx::NpdmBinary::setProductCode(const std::string & product_code)
 	mProductCode = product_code;
 }
 
-const nx::AccessControlInfoBinary & nx::NpdmBinary::getAci() const
+const nn::hac::AccessControlInfoBinary & nn::hac::NpdmBinary::getAci() const
 {
 	return mAci;
 }
 
-void nx::NpdmBinary::setAci(const AccessControlInfoBinary & aci)
+void nn::hac::NpdmBinary::setAci(const AccessControlInfoBinary & aci)
 {
 	mAci = aci;
 }
 
-const nx::AccessControlInfoDescBinary & nx::NpdmBinary::getAcid() const
+const nn::hac::AccessControlInfoDescBinary & nn::hac::NpdmBinary::getAcid() const
 {
 	return mAcid;
 }
 
-void nx::NpdmBinary::setAcid(const AccessControlInfoDescBinary & acid)
+void nn::hac::NpdmBinary::setAcid(const AccessControlInfoDescBinary & acid)
 {
 	mAcid = acid;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/NroHeader.cpp b/lib/libhac/source/NroHeader.cpp
index dfd2ba3..40f8d21 100644
--- a/lib/libhac/source/NroHeader.cpp
+++ b/lib/libhac/source/NroHeader.cpp
@@ -1,16 +1,16 @@
-#include <nx/NroHeader.h>
+#include <nn/hac/NroHeader.h>
 
-nx::NroHeader::NroHeader()
+nn::hac::NroHeader::NroHeader()
 {
 	clear();
 }
 
-nx::NroHeader::NroHeader(const NroHeader& other)
+nn::hac::NroHeader::NroHeader(const NroHeader& other)
 {
 	*this = other;
 }
 
-void nx::NroHeader::operator=(const NroHeader& other)
+void nn::hac::NroHeader::operator=(const NroHeader& other)
 {
 	clear();
 	mRoCrt = other.mRoCrt;
@@ -26,7 +26,7 @@ void nx::NroHeader::operator=(const NroHeader& other)
 	mRoDynSymInfo = other.mRoDynSymInfo;
 }
 
-bool nx::NroHeader::operator==(const NroHeader& other) const
+bool nn::hac::NroHeader::operator==(const NroHeader& other) const
 {
 	return (mRoCrt == other.mRoCrt) \
 		&& (mNroSize == other.mNroSize) \
@@ -41,15 +41,15 @@ bool nx::NroHeader::operator==(const NroHeader& other) const
 		&& (mRoDynSymInfo == other.mRoDynSymInfo);
 }
 
-bool nx::NroHeader::operator!=(const NroHeader& other) const
+bool nn::hac::NroHeader::operator!=(const NroHeader& other) const
 {
 	return !(*this == other);
 }
 
-void nx::NroHeader::toBytes()
+void nn::hac::NroHeader::toBytes()
 {
 	mRawBinary.alloc(sizeof(sNroHeader));
-	nx::sNroHeader* hdr = (nx::sNroHeader*)mRawBinary.data();
+	nn::hac::sNroHeader* hdr = (nn::hac::sNroHeader*)mRawBinary.data();
 
 	// set header identifers
 	hdr->st_magic = nro::kNroStructMagic;
@@ -93,7 +93,7 @@ void nx::NroHeader::toBytes()
 	hdr->dyn_sym.size = mRoDynSymInfo.size;
 }
 
-void nx::NroHeader::fromBytes(const byte_t* data, size_t len)
+void nn::hac::NroHeader::fromBytes(const byte_t* data, size_t len)
 {
 	// check input data size
 	if (len < sizeof(sNroHeader))
@@ -109,7 +109,7 @@ void nx::NroHeader::fromBytes(const byte_t* data, size_t len)
 	memcpy(mRawBinary.data(), data, mRawBinary.size());
 
 	// get sNroHeader ptr
-	const nx::sNroHeader* hdr = (const nx::sNroHeader*)mRawBinary.data();
+	const nn::hac::sNroHeader* hdr = (const nn::hac::sNroHeader*)mRawBinary.data();
 	
 	// check NRO signature
 	if (hdr->st_magic.get() != nro::kNroStructMagic)
@@ -150,12 +150,12 @@ void nx::NroHeader::fromBytes(const byte_t* data, size_t len)
 	mRoDynSymInfo.size = hdr->dyn_sym.size.get();
 }
 
-const fnd::Vec<byte_t>& nx::NroHeader::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::NroHeader::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::NroHeader::clear()
+void nn::hac::NroHeader::clear()
 {
 	mRawBinary.clear();
 	memset(&mRoCrt, 0, sizeof(mRoCrt));
@@ -169,102 +169,102 @@ void nx::NroHeader::clear()
 	memset(&mRoDynSymInfo, 0, sizeof(mRoDynSymInfo));
 }
 
-const nx::NroHeader::sRoCrt& nx::NroHeader::getRoCrt() const
+const nn::hac::NroHeader::sRoCrt& nn::hac::NroHeader::getRoCrt() const
 {
 	return mRoCrt;
 }
 
-void nx::NroHeader::setRoCrt(const sRoCrt& ro_crt)
+void nn::hac::NroHeader::setRoCrt(const sRoCrt& ro_crt)
 {
 	mRoCrt = ro_crt;
 }
 
-uint32_t nx::NroHeader::getNroSize() const
+uint32_t nn::hac::NroHeader::getNroSize() const
 {
 	return mNroSize;
 }
 
-void nx::NroHeader::setNroSize(uint32_t size)
+void nn::hac::NroHeader::setNroSize(uint32_t size)
 {
 	mNroSize = size;
 }
 
-const nx::NroHeader::sSection& nx::NroHeader::getTextInfo() const
+const nn::hac::NroHeader::sSection& nn::hac::NroHeader::getTextInfo() const
 {
 	return mTextInfo;
 }
 
-void nx::NroHeader::setTextInfo(const sSection& info)
+void nn::hac::NroHeader::setTextInfo(const sSection& info)
 {
 	mTextInfo = info;
 }
 
-const nx::NroHeader::sSection& nx::NroHeader::getRoInfo() const
+const nn::hac::NroHeader::sSection& nn::hac::NroHeader::getRoInfo() const
 {
 	return mRoInfo;
 }
 
-void nx::NroHeader::setRoInfo(const sSection& info)
+void nn::hac::NroHeader::setRoInfo(const sSection& info)
 {
 	mRoInfo = info;
 }
 
-const nx::NroHeader::sSection& nx::NroHeader::getDataInfo() const
+const nn::hac::NroHeader::sSection& nn::hac::NroHeader::getDataInfo() const
 {
 	return mDataInfo;
 }
 
-void nx::NroHeader::setDataInfo(const sSection& info)
+void nn::hac::NroHeader::setDataInfo(const sSection& info)
 {
 	mDataInfo = info;
 }
 
-uint32_t nx::NroHeader::getBssSize() const
+uint32_t nn::hac::NroHeader::getBssSize() const
 {
 	return mBssSize;
 }
 
-void nx::NroHeader::setBssSize(uint32_t size)
+void nn::hac::NroHeader::setBssSize(uint32_t size)
 {
 	mBssSize = size;
 }
 
-const nx::NroHeader::sModuleId& nx::NroHeader::getModuleId() const
+const nn::hac::NroHeader::sModuleId& nn::hac::NroHeader::getModuleId() const
 {
 	return mModuleId;
 }
 
-void nx::NroHeader::setModuleId(const sModuleId& id)
+void nn::hac::NroHeader::setModuleId(const sModuleId& id)
 {
 	mModuleId = id;
 }
 
-const nx::NroHeader::sSection& nx::NroHeader::getRoEmbeddedInfo() const
+const nn::hac::NroHeader::sSection& nn::hac::NroHeader::getRoEmbeddedInfo() const
 {
 	return mRoEmbeddedInfo;
 }
 
-void nx::NroHeader::setRoEmbeddedInfo(const sSection& info)
+void nn::hac::NroHeader::setRoEmbeddedInfo(const sSection& info)
 {
 	mRoEmbeddedInfo = info;
 }
 
-const nx::NroHeader::sSection& nx::NroHeader::getRoDynStrInfo() const
+const nn::hac::NroHeader::sSection& nn::hac::NroHeader::getRoDynStrInfo() const
 {
 	return mRoDynStrInfo;
 }
 
-void nx::NroHeader::setRoDynStrInfo(const sSection& info)
+void nn::hac::NroHeader::setRoDynStrInfo(const sSection& info)
 {
 	mRoDynStrInfo = info;
 }
 
-const nx::NroHeader::sSection& nx::NroHeader::getRoDynSymInfo() const
+const nn::hac::NroHeader::sSection& nn::hac::NroHeader::getRoDynSymInfo() const
 {
 	return mRoDynSymInfo;
 }
 
-void nx::NroHeader::setRoDynSymInfo(const sSection& info)
+void nn::hac::NroHeader::setRoDynSymInfo(const sSection& info)
 {
 	mRoDynSymInfo = info;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/NsoHeader.cpp b/lib/libhac/source/NsoHeader.cpp
index 4612786..85468fd 100644
--- a/lib/libhac/source/NsoHeader.cpp
+++ b/lib/libhac/source/NsoHeader.cpp
@@ -1,16 +1,16 @@
-#include <nx/NsoHeader.h>
+#include <nn/hac/NsoHeader.h>
 
-nx::NsoHeader::NsoHeader()
+nn::hac::NsoHeader::NsoHeader()
 {
 	clear();
 }
 
-nx::NsoHeader::NsoHeader(const NsoHeader& other)
+nn::hac::NsoHeader::NsoHeader(const NsoHeader& other)
 {
 	*this = other;
 }
 
-void nx::NsoHeader::operator=(const NsoHeader& other)
+void nn::hac::NsoHeader::operator=(const NsoHeader& other)
 {
 	clear();
 	mModuleId = other.mModuleId;
@@ -25,7 +25,7 @@ void nx::NsoHeader::operator=(const NsoHeader& other)
 }
 
 
-bool nx::NsoHeader::operator==(const NsoHeader& other) const
+bool nn::hac::NsoHeader::operator==(const NsoHeader& other) const
 {
 	return (mModuleId == other.mModuleId) \
 		&& (mBssSize == other.mBssSize) \
@@ -38,15 +38,15 @@ bool nx::NsoHeader::operator==(const NsoHeader& other) const
 		&& (mRoDynSymInfo == other.mRoDynSymInfo);
 }
 
-bool nx::NsoHeader::operator!=(const NsoHeader& other) const
+bool nn::hac::NsoHeader::operator!=(const NsoHeader& other) const
 {
 	return !(*this == other);
 }
 
-void nx::NsoHeader::toBytes()
+void nn::hac::NsoHeader::toBytes()
 {
 	mRawBinary.alloc(sizeof(sNsoHeader));
-	nx::sNsoHeader* hdr = (nx::sNsoHeader*)mRawBinary.data();
+	nn::hac::sNsoHeader* hdr = (nn::hac::sNsoHeader*)mRawBinary.data();
 
 	// set header identifers
 	hdr->st_magic = nso::kNsoStructMagic;
@@ -125,7 +125,7 @@ void nx::NsoHeader::toBytes()
 	hdr->flags = flags;
 }
 
-void nx::NsoHeader::fromBytes(const byte_t* data, size_t len)
+void nn::hac::NsoHeader::fromBytes(const byte_t* data, size_t len)
 {
 	// check input data size
 	if (len < sizeof(sNsoHeader))
@@ -141,7 +141,7 @@ void nx::NsoHeader::fromBytes(const byte_t* data, size_t len)
 	memcpy(mRawBinary.data(), data, mRawBinary.size());
 
 	// get sNsoHeader ptr
-	const nx::sNsoHeader* hdr = (const nx::sNsoHeader*)mRawBinary.data();
+	const nn::hac::sNsoHeader* hdr = (const nn::hac::sNsoHeader*)mRawBinary.data();
 	
 	// check NSO signature
 	if (hdr->st_magic.get() != nso::kNsoStructMagic)
@@ -196,12 +196,12 @@ void nx::NsoHeader::fromBytes(const byte_t* data, size_t len)
 	mRoDynSymInfo.size = hdr->dyn_sym.size.get();
 }
 
-const fnd::Vec<byte_t>& nx::NsoHeader::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::NsoHeader::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::NsoHeader::clear()
+void nn::hac::NsoHeader::clear()
 {
 	mRawBinary.clear();
 	memset(&mModuleId, 0, sizeof(mModuleId));
@@ -215,92 +215,92 @@ void nx::NsoHeader::clear()
 	memset(&mRoDynSymInfo, 0, sizeof(mRoDynSymInfo));
 }
 
-const nx::NsoHeader::sModuleId& nx::NsoHeader::getModuleId() const
+const nn::hac::NsoHeader::sModuleId& nn::hac::NsoHeader::getModuleId() const
 {
 	return mModuleId;
 }
 
-void nx::NsoHeader::setModuleId(const sModuleId& id)
+void nn::hac::NsoHeader::setModuleId(const sModuleId& id)
 {
 	mModuleId = id;
 }
 
-uint32_t nx::NsoHeader::getBssSize() const
+uint32_t nn::hac::NsoHeader::getBssSize() const
 {
 	return mBssSize;
 }
 
-void nx::NsoHeader::setBssSize(uint32_t size)
+void nn::hac::NsoHeader::setBssSize(uint32_t size)
 {
 	mBssSize = size;
 }
 
-const nx::NsoHeader::sCodeSegment& nx::NsoHeader::getTextSegmentInfo() const
+const nn::hac::NsoHeader::sCodeSegment& nn::hac::NsoHeader::getTextSegmentInfo() const
 {
 	return mTextSegmentInfo;
 }
 
-void nx::NsoHeader::setTextSegmentInfo(const sCodeSegment& info)
+void nn::hac::NsoHeader::setTextSegmentInfo(const sCodeSegment& info)
 {
 	mTextSegmentInfo = info;
 }
 
-const nx::NsoHeader::sCodeSegment& nx::NsoHeader::getRoSegmentInfo() const
+const nn::hac::NsoHeader::sCodeSegment& nn::hac::NsoHeader::getRoSegmentInfo() const
 {
 	return mRoSegmentInfo;
 }
 
-void nx::NsoHeader::setRoSegmentInfo(const sCodeSegment& info)
+void nn::hac::NsoHeader::setRoSegmentInfo(const sCodeSegment& info)
 {
 	mRoSegmentInfo = info;
 }
 
-const nx::NsoHeader::sCodeSegment& nx::NsoHeader::getDataSegmentInfo() const
+const nn::hac::NsoHeader::sCodeSegment& nn::hac::NsoHeader::getDataSegmentInfo() const
 {
 	return mDataSegmentInfo;
 }
 
-void nx::NsoHeader::setDataSegmentInfo(const sCodeSegment& info)
+void nn::hac::NsoHeader::setDataSegmentInfo(const sCodeSegment& info)
 {
 	mDataSegmentInfo = info;
 }
 
-const nx::NsoHeader::sLayout& nx::NsoHeader::getModuleNameInfo() const
+const nn::hac::NsoHeader::sLayout& nn::hac::NsoHeader::getModuleNameInfo() const
 {
 	return mModuleNameInfo;
 }
 
-void nx::NsoHeader::setModuleNameInfo(const sLayout& info)
+void nn::hac::NsoHeader::setModuleNameInfo(const sLayout& info)
 {
 	mModuleNameInfo = info;
 }
 
-const nx::NsoHeader::sLayout& nx::NsoHeader::getRoEmbeddedInfo() const
+const nn::hac::NsoHeader::sLayout& nn::hac::NsoHeader::getRoEmbeddedInfo() const
 {
 	return mRoEmbeddedInfo;
 }
 
-void nx::NsoHeader::setRoEmbeddedInfo(const sLayout& info)
+void nn::hac::NsoHeader::setRoEmbeddedInfo(const sLayout& info)
 {
 	mRoEmbeddedInfo = info;
 }
 
-const nx::NsoHeader::sLayout& nx::NsoHeader::getRoDynStrInfo() const
+const nn::hac::NsoHeader::sLayout& nn::hac::NsoHeader::getRoDynStrInfo() const
 {
 	return mRoDynStrInfo;
 }
 
-void nx::NsoHeader::setRoDynStrInfo(const sLayout& info)
+void nn::hac::NsoHeader::setRoDynStrInfo(const sLayout& info)
 {
 	mRoDynStrInfo = info;
 }
 
-const nx::NsoHeader::sLayout& nx::NsoHeader::getRoDynSymInfo() const
+const nn::hac::NsoHeader::sLayout& nn::hac::NsoHeader::getRoDynSymInfo() const
 {
 	return mRoDynSymInfo;
 }
 
-void nx::NsoHeader::setRoDynSymInfo(const sLayout& info)
+void nn::hac::NsoHeader::setRoDynSymInfo(const sLayout& info)
 {
 	mRoDynSymInfo = info;
 }
\ No newline at end of file
diff --git a/lib/libhac/source/PfsHeader.cpp b/lib/libhac/source/PfsHeader.cpp
index 7fdae51..7923992 100644
--- a/lib/libhac/source/PfsHeader.cpp
+++ b/lib/libhac/source/PfsHeader.cpp
@@ -1,16 +1,16 @@
-#include <nx/PfsHeader.h>
+#include <nn/hac/PfsHeader.h>
 
-nx::PfsHeader::PfsHeader()
+nn::hac::PfsHeader::PfsHeader()
 {
 	clear();
 }
 
-nx::PfsHeader::PfsHeader(const PfsHeader & other)
+nn::hac::PfsHeader::PfsHeader(const PfsHeader & other)
 {
 	*this = other;
 }
 
-void nx::PfsHeader::operator=(const PfsHeader & other)
+void nn::hac::PfsHeader::operator=(const PfsHeader & other)
 {
 	if (other.getBytes().size())
 	{
@@ -24,24 +24,24 @@ void nx::PfsHeader::operator=(const PfsHeader & other)
 	}
 }
 
-bool nx::PfsHeader::operator==(const PfsHeader & other) const
+bool nn::hac::PfsHeader::operator==(const PfsHeader & other) const
 {
 	return (mFsType == other.mFsType) \
 		&& (mFileList == other.mFileList);
 }
 
-bool nx::PfsHeader::operator!=(const PfsHeader & other) const
+bool nn::hac::PfsHeader::operator!=(const PfsHeader & other) const
 {
 	return !(*this == other);
 }
 
-const fnd::Vec<byte_t>& nx::PfsHeader::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::PfsHeader::getBytes() const
 {
 	return mRawBinary;
 }
 
 
-void nx::PfsHeader::toBytes()
+void nn::hac::PfsHeader::toBytes()
 {
 	// calculate name table size
 	size_t name_table_size = 0;
@@ -113,7 +113,7 @@ void nx::PfsHeader::toBytes()
 	
 }
 
-void nx::PfsHeader::fromBytes(const byte_t* data, size_t len)
+void nn::hac::PfsHeader::fromBytes(const byte_t* data, size_t len)
 {
 	// check input length meets minimum size
 	if (len < sizeof(sPfsHeader))
@@ -195,39 +195,39 @@ void nx::PfsHeader::fromBytes(const byte_t* data, size_t len)
 	
 }
 
-void nx::PfsHeader::clear()
+void nn::hac::PfsHeader::clear()
 {
 	mRawBinary.clear();
 	mFsType = TYPE_PFS0;
 	mFileList.clear();
 }
 
-nx::PfsHeader::FsType nx::PfsHeader::getFsType() const
+nn::hac::PfsHeader::FsType nn::hac::PfsHeader::getFsType() const
 {
 	return mFsType;
 }
 
-void nx::PfsHeader::setFsType(FsType type)
+void nn::hac::PfsHeader::setFsType(FsType type)
 {
 	mFsType = type;
 }
 
-const fnd::List<nx::PfsHeader::sFile>& nx::PfsHeader::getFileList() const
+const fnd::List<nn::hac::PfsHeader::sFile>& nn::hac::PfsHeader::getFileList() const
 {
 	return mFileList;
 }
 
-void nx::PfsHeader::addFile(const std::string & name, size_t size)
+void nn::hac::PfsHeader::addFile(const std::string & name, size_t size)
 {
 	mFileList.addElement({ name, 0, size, 0 });
 }
 
-void nx::PfsHeader::addFile(const std::string & name, size_t size, size_t hash_protected_size, const crypto::sha::sSha256Hash& hash)
+void nn::hac::PfsHeader::addFile(const std::string & name, size_t size, size_t hash_protected_size, const crypto::sha::sSha256Hash& hash)
 {
 	mFileList.addElement({ name, 0, size, hash_protected_size, hash });
 }
 
-size_t nx::PfsHeader::getFileEntrySize(FsType fs_type)
+size_t nn::hac::PfsHeader::getFileEntrySize(FsType fs_type)
 {
 	size_t size = 0;
 	switch(fs_type)
@@ -244,7 +244,7 @@ size_t nx::PfsHeader::getFileEntrySize(FsType fs_type)
 	return size;
 }
 
-void nx::PfsHeader::calculateOffsets(size_t data_offset)
+void nn::hac::PfsHeader::calculateOffsets(size_t data_offset)
 {
 	for (size_t i = 0; i < mFileList.size(); i++)
 	{
diff --git a/lib/libhac/source/ServiceAccessControlBinary.cpp b/lib/libhac/source/ServiceAccessControlBinary.cpp
index b46f4f9..3aac03d 100644
--- a/lib/libhac/source/ServiceAccessControlBinary.cpp
+++ b/lib/libhac/source/ServiceAccessControlBinary.cpp
@@ -1,32 +1,32 @@
-#include <nx/ServiceAccessControlBinary.h>
+#include <nn/hac/ServiceAccessControlBinary.h>
 
-nx::ServiceAccessControlBinary::ServiceAccessControlBinary()
+nn::hac::ServiceAccessControlBinary::ServiceAccessControlBinary()
 {
 	clear();
 }
 
-nx::ServiceAccessControlBinary::ServiceAccessControlBinary(const ServiceAccessControlBinary & other)
+nn::hac::ServiceAccessControlBinary::ServiceAccessControlBinary(const ServiceAccessControlBinary & other)
 {
 	*this = other;
 }
 
-void nx::ServiceAccessControlBinary::operator=(const ServiceAccessControlBinary & other)
+void nn::hac::ServiceAccessControlBinary::operator=(const ServiceAccessControlBinary & other)
 {
 	mRawBinary = other.mRawBinary;
 	mServices = other.mServices;
 }
 
-bool nx::ServiceAccessControlBinary::operator==(const ServiceAccessControlBinary & other) const
+bool nn::hac::ServiceAccessControlBinary::operator==(const ServiceAccessControlBinary & other) const
 {
 	return (mServices == other.mServices);
 }
 
-bool nx::ServiceAccessControlBinary::operator!=(const ServiceAccessControlBinary & other) const
+bool nn::hac::ServiceAccessControlBinary::operator!=(const ServiceAccessControlBinary & other) const
 {
 	return !(*this == other);
 }
 
-void nx::ServiceAccessControlBinary::toBytes()
+void nn::hac::ServiceAccessControlBinary::toBytes()
 {
 	size_t totalSize = 0;
 	for (size_t i = 0; i < mServices.size(); i++)
@@ -42,7 +42,7 @@ void nx::ServiceAccessControlBinary::toBytes()
 	}
 }
 
-void nx::ServiceAccessControlBinary::fromBytes(const byte_t* data, size_t len)
+void nn::hac::ServiceAccessControlBinary::fromBytes(const byte_t* data, size_t len)
 {
 	clear();
 	mRawBinary.alloc(len);
@@ -56,23 +56,23 @@ void nx::ServiceAccessControlBinary::fromBytes(const byte_t* data, size_t len)
 	}
 }
 
-const fnd::Vec<byte_t>& nx::ServiceAccessControlBinary::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::ServiceAccessControlBinary::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::ServiceAccessControlBinary::clear()
+void nn::hac::ServiceAccessControlBinary::clear()
 {
 	mRawBinary.clear();
 	mServices.clear();
 }
 
-const fnd::List<nx::ServiceAccessControlEntry>& nx::ServiceAccessControlBinary::getServiceList() const
+const fnd::List<nn::hac::ServiceAccessControlEntry>& nn::hac::ServiceAccessControlBinary::getServiceList() const
 {
 	return mServices;
 }
 
-void nx::ServiceAccessControlBinary::addService(const ServiceAccessControlEntry& service)
+void nn::hac::ServiceAccessControlBinary::addService(const ServiceAccessControlEntry& service)
 {
 	mServices.addElement(service);
 }
\ No newline at end of file
diff --git a/lib/libhac/source/ServiceAccessControlEntry.cpp b/lib/libhac/source/ServiceAccessControlEntry.cpp
index 00d3b9c..1e6e7ef 100644
--- a/lib/libhac/source/ServiceAccessControlEntry.cpp
+++ b/lib/libhac/source/ServiceAccessControlEntry.cpp
@@ -1,23 +1,23 @@
-#include <nx/ServiceAccessControlEntry.h>
+#include <nn/hac/ServiceAccessControlEntry.h>
 
-nx::ServiceAccessControlEntry::ServiceAccessControlEntry()
+nn::hac::ServiceAccessControlEntry::ServiceAccessControlEntry()
 {
 	clear();
 }
 
-nx::ServiceAccessControlEntry::ServiceAccessControlEntry(const std::string & name, bool isServer) :
+nn::hac::ServiceAccessControlEntry::ServiceAccessControlEntry(const std::string & name, bool isServer) :
 	mIsServer(isServer),
 	mName(name)
 {
 	toBytes();
 }
 
-nx::ServiceAccessControlEntry::ServiceAccessControlEntry(const ServiceAccessControlEntry & other)
+nn::hac::ServiceAccessControlEntry::ServiceAccessControlEntry(const ServiceAccessControlEntry & other)
 {
 	*this = other;
 }
 
-void nx::ServiceAccessControlEntry::operator=(const ServiceAccessControlEntry & other)
+void nn::hac::ServiceAccessControlEntry::operator=(const ServiceAccessControlEntry & other)
 {
 	if (other.getBytes().size())
 	{
@@ -31,19 +31,19 @@ void nx::ServiceAccessControlEntry::operator=(const ServiceAccessControlEntry &
 	}
 }
 
-bool nx::ServiceAccessControlEntry::operator==(const ServiceAccessControlEntry & other) const
+bool nn::hac::ServiceAccessControlEntry::operator==(const ServiceAccessControlEntry & other) const
 {
 	return (mIsServer == other.mIsServer) \
 		&& (mName == other.mName);
 }
 
-bool nx::ServiceAccessControlEntry::operator!=(const ServiceAccessControlEntry & other) const
+bool nn::hac::ServiceAccessControlEntry::operator!=(const ServiceAccessControlEntry & other) const
 {
 	return !(*this == other);
 }
 
 
-void nx::ServiceAccessControlEntry::toBytes()
+void nn::hac::ServiceAccessControlEntry::toBytes()
 {
 	try {
 		mRawBinary.alloc(mName.size() + 1);
@@ -68,7 +68,7 @@ void nx::ServiceAccessControlEntry::toBytes()
 	memcpy(mRawBinary.data() + 1, mName.c_str(), mName.length());
 }
 
-void nx::ServiceAccessControlEntry::fromBytes(const byte_t* data, size_t len)
+void nn::hac::ServiceAccessControlEntry::fromBytes(const byte_t* data, size_t len)
 {
 	bool isServer = (data[0] & SAC_IS_SERVER) == SAC_IS_SERVER;
 	size_t nameLen = (data[0] & SAC_NAME_LEN_MASK) + 1; // bug?
@@ -94,33 +94,33 @@ void nx::ServiceAccessControlEntry::fromBytes(const byte_t* data, size_t len)
 	mName = std::string((const char*)(mRawBinary.data() + 1), nameLen);
 }
 
-const fnd::Vec<byte_t>& nx::ServiceAccessControlEntry::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::ServiceAccessControlEntry::getBytes() const
 {
 	return mRawBinary;
 }
 
-void nx::ServiceAccessControlEntry::clear()
+void nn::hac::ServiceAccessControlEntry::clear()
 {
 	mIsServer = false;
 	mName.clear();
 }
 
-bool nx::ServiceAccessControlEntry::isServer() const
+bool nn::hac::ServiceAccessControlEntry::isServer() const
 {
 	return mIsServer;
 }
 
-void nx::ServiceAccessControlEntry::setIsServer(bool isServer)
+void nn::hac::ServiceAccessControlEntry::setIsServer(bool isServer)
 {
 	mIsServer = isServer;
 }
 
-const std::string & nx::ServiceAccessControlEntry::getName() const
+const std::string & nn::hac::ServiceAccessControlEntry::getName() const
 {
 	return mName;
 }
 
-void nx::ServiceAccessControlEntry::setName(const std::string & name)
+void nn::hac::ServiceAccessControlEntry::setName(const std::string & name)
 {
 	if (name.length() > kMaxServiceNameLen)
 	{
diff --git a/lib/libhac/source/SystemCallEntry.cpp b/lib/libhac/source/SystemCallEntry.cpp
index bf4a764..6af1677 100644
--- a/lib/libhac/source/SystemCallEntry.cpp
+++ b/lib/libhac/source/SystemCallEntry.cpp
@@ -1,6 +1,6 @@
-#include <nx/SystemCallEntry.h>
+#include <nn/hac/SystemCallEntry.h>
 
-nx::SystemCallEntry::SystemCallEntry() :
+nn::hac::SystemCallEntry::SystemCallEntry() :
 	mCap(kCapId),
 	mSystemCallUpper(0),
 	mSystemCallLower(0)
@@ -8,7 +8,7 @@ nx::SystemCallEntry::SystemCallEntry() :
 
 }
 
-nx::SystemCallEntry::SystemCallEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::SystemCallEntry::SystemCallEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kCapId),
 	mSystemCallUpper(0),
 	mSystemCallLower(0)
@@ -16,7 +16,7 @@ nx::SystemCallEntry::SystemCallEntry(const KernelCapabilityEntry & kernel_cap) :
 	setKernelCapability(kernel_cap);
 }
 
-nx::SystemCallEntry::SystemCallEntry(uint32_t upper_bits, uint32_t lower_bits) :
+nn::hac::SystemCallEntry::SystemCallEntry(uint32_t upper_bits, uint32_t lower_bits) :
 	mCap(kCapId),
 	mSystemCallUpper(0),
 	mSystemCallLower(0)
@@ -25,30 +25,30 @@ nx::SystemCallEntry::SystemCallEntry(uint32_t upper_bits, uint32_t lower_bits) :
 	setSystemCallLowerBits(lower_bits);
 }
 
-void nx::SystemCallEntry::operator=(const SystemCallEntry& other)
+void nn::hac::SystemCallEntry::operator=(const SystemCallEntry& other)
 {
 	mSystemCallUpper = other.mSystemCallUpper;
 	mSystemCallLower = other.mSystemCallLower;
 	updateCapField();
 }
 
-bool nx::SystemCallEntry::operator==(const SystemCallEntry& other) const
+bool nn::hac::SystemCallEntry::operator==(const SystemCallEntry& other) const
 {
 	return (mSystemCallUpper == other.mSystemCallUpper) \
 		&& (mSystemCallLower == other.mSystemCallLower);
 }
 
-bool nx::SystemCallEntry::operator!=(const SystemCallEntry& other) const
+bool nn::hac::SystemCallEntry::operator!=(const SystemCallEntry& other) const
 {
 	return !(*this == other);
 }
 
-const nx::KernelCapabilityEntry & nx::SystemCallEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::SystemCallEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::SystemCallEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::SystemCallEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kCapId)
 	{
@@ -59,12 +59,12 @@ void nx::SystemCallEntry::setKernelCapability(const KernelCapabilityEntry & kern
 	processCapField();
 }
 
-uint32_t nx::SystemCallEntry::getSystemCallUpperBits() const
+uint32_t nn::hac::SystemCallEntry::getSystemCallUpperBits() const
 {
 	return mSystemCallUpper;
 }
 
-void nx::SystemCallEntry::setSystemCallUpperBits(uint32_t upper_bits)
+void nn::hac::SystemCallEntry::setSystemCallUpperBits(uint32_t upper_bits)
 {
 	if (upper_bits > kSysCallUpperMax)
 	{
@@ -75,12 +75,12 @@ void nx::SystemCallEntry::setSystemCallUpperBits(uint32_t upper_bits)
 	updateCapField();
 }
 
-uint32_t nx::SystemCallEntry::getSystemCallLowerBits() const
+uint32_t nn::hac::SystemCallEntry::getSystemCallLowerBits() const
 {
 	return mSystemCallLower;
 }
 
-void nx::SystemCallEntry::setSystemCallLowerBits(uint32_t lower_bits)
+void nn::hac::SystemCallEntry::setSystemCallLowerBits(uint32_t lower_bits)
 {
 	if (lower_bits > kSysCallLowerMax)
 	{
diff --git a/lib/libhac/source/SystemCallHandler.cpp b/lib/libhac/source/SystemCallHandler.cpp
index da6d677..c2e58b5 100644
--- a/lib/libhac/source/SystemCallHandler.cpp
+++ b/lib/libhac/source/SystemCallHandler.cpp
@@ -1,29 +1,29 @@
-#include <nx/SystemCallHandler.h>
-#include <nx/SystemCallEntry.h>
+#include <nn/hac/SystemCallHandler.h>
+#include <nn/hac/SystemCallEntry.h>
 
-nx::SystemCallHandler::SystemCallHandler() :
+nn::hac::SystemCallHandler::SystemCallHandler() :
 	mIsSet(false),
 	mSystemCalls()
 {}
 
-void nx::SystemCallHandler::operator=(const SystemCallHandler & other)
+void nn::hac::SystemCallHandler::operator=(const SystemCallHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mSystemCalls = other.mSystemCalls;
 }
 
-bool nx::SystemCallHandler::operator==(const SystemCallHandler & other) const
+bool nn::hac::SystemCallHandler::operator==(const SystemCallHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mSystemCalls == other.mSystemCalls);
 }
 
-bool nx::SystemCallHandler::operator!=(const SystemCallHandler & other) const
+bool nn::hac::SystemCallHandler::operator!=(const SystemCallHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::SystemCallHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::SystemCallHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() == 0)
 		return;
@@ -49,7 +49,7 @@ void nx::SystemCallHandler::importKernelCapabilityList(const fnd::List<KernelCap
 	mIsSet = true;
 }
 
-void nx::SystemCallHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::SystemCallHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -80,23 +80,23 @@ void nx::SystemCallHandler::exportKernelCapabilityList(fnd::List<KernelCapabilit
 	}
 }
 
-void nx::SystemCallHandler::clear()
+void nn::hac::SystemCallHandler::clear()
 {
 	mIsSet = false;
 	mSystemCalls.clear();
 }
 
-bool nx::SystemCallHandler::isSet() const
+bool nn::hac::SystemCallHandler::isSet() const
 {
 	return mIsSet;
 }
 
-const fnd::List<uint8_t>& nx::SystemCallHandler::getSystemCalls() const
+const fnd::List<uint8_t>& nn::hac::SystemCallHandler::getSystemCalls() const
 {
 	return mSystemCalls;
 }
 
-void nx::SystemCallHandler::setSystemCallList(const fnd::List<uint8_t>& calls)
+void nn::hac::SystemCallHandler::setSystemCallList(const fnd::List<uint8_t>& calls)
 {
 	mSystemCalls.clear();
 	for (size_t i = 0; i < calls.size(); i++)
diff --git a/lib/libhac/source/ThreadInfoEntry.cpp b/lib/libhac/source/ThreadInfoEntry.cpp
index 00cd7c8..a1c957c 100644
--- a/lib/libhac/source/ThreadInfoEntry.cpp
+++ b/lib/libhac/source/ThreadInfoEntry.cpp
@@ -1,6 +1,6 @@
-#include <nx/ThreadInfoEntry.h>
+#include <nn/hac/ThreadInfoEntry.h>
 
-nx::ThreadInfoEntry::ThreadInfoEntry() :
+nn::hac::ThreadInfoEntry::ThreadInfoEntry() :
 	mCap(kCapId),
 	mMinPriority(kDefaultPriority),
 	mMaxPriority(kDefaultPriority),
@@ -8,7 +8,7 @@ nx::ThreadInfoEntry::ThreadInfoEntry() :
 	mMaxCpuId(kDefaultCpuId)
 {}
 
-nx::ThreadInfoEntry::ThreadInfoEntry(const KernelCapabilityEntry & kernel_cap) :
+nn::hac::ThreadInfoEntry::ThreadInfoEntry(const KernelCapabilityEntry & kernel_cap) :
 	mCap(kCapId),
 	mMinPriority(kDefaultPriority),
 	mMaxPriority(kDefaultPriority),
@@ -18,7 +18,7 @@ nx::ThreadInfoEntry::ThreadInfoEntry(const KernelCapabilityEntry & kernel_cap) :
 	setKernelCapability(kernel_cap);
 }
 
-nx::ThreadInfoEntry::ThreadInfoEntry(uint8_t min_priority, uint8_t max_priority, uint8_t min_core_number, uint8_t max_core_number) :
+nn::hac::ThreadInfoEntry::ThreadInfoEntry(uint8_t min_priority, uint8_t max_priority, uint8_t min_core_number, uint8_t max_core_number) :
 	mCap(kCapId),
 	mMinPriority(kDefaultPriority),
 	mMaxPriority(kDefaultPriority),
@@ -31,7 +31,7 @@ nx::ThreadInfoEntry::ThreadInfoEntry(uint8_t min_priority, uint8_t max_priority,
 	setMaxCpuId(max_core_number);
 }
 
-void nx::ThreadInfoEntry::operator=(const ThreadInfoEntry& other)
+void nn::hac::ThreadInfoEntry::operator=(const ThreadInfoEntry& other)
 {
 	mMinPriority = other.mMinPriority;
 	mMaxPriority = other.mMaxPriority;
@@ -40,7 +40,7 @@ void nx::ThreadInfoEntry::operator=(const ThreadInfoEntry& other)
 	updateCapField();
 }
 
-bool nx::ThreadInfoEntry::operator==(const ThreadInfoEntry& other) const
+bool nn::hac::ThreadInfoEntry::operator==(const ThreadInfoEntry& other) const
 {
 	return (mMinPriority == other.mMinPriority) \
 		&& (mMaxPriority == other.mMaxPriority) \
@@ -48,17 +48,17 @@ bool nx::ThreadInfoEntry::operator==(const ThreadInfoEntry& other) const
 		&& (mMaxCpuId == other.mMaxCpuId);
 }
 
-bool nx::ThreadInfoEntry::operator!=(const ThreadInfoEntry& other) const
+bool nn::hac::ThreadInfoEntry::operator!=(const ThreadInfoEntry& other) const
 {
 	return !(*this == other);
 }
 
-const nx::KernelCapabilityEntry & nx::ThreadInfoEntry::getKernelCapability() const
+const nn::hac::KernelCapabilityEntry & nn::hac::ThreadInfoEntry::getKernelCapability() const
 {
 	return mCap;
 }
 
-void nx::ThreadInfoEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
+void nn::hac::ThreadInfoEntry::setKernelCapability(const KernelCapabilityEntry & kernel_cap)
 {
 	if (kernel_cap.getType() != kCapId)
 	{
@@ -69,12 +69,12 @@ void nx::ThreadInfoEntry::setKernelCapability(const KernelCapabilityEntry & kern
 	processCapField();
 }
 
-uint8_t nx::ThreadInfoEntry::getMinPriority() const
+uint8_t nn::hac::ThreadInfoEntry::getMinPriority() const
 {
 	return mMinPriority;
 }
 
-void nx::ThreadInfoEntry::setMinPriority(uint8_t priority)
+void nn::hac::ThreadInfoEntry::setMinPriority(uint8_t priority)
 {
 	if (priority > kMaxVal)
 	{
@@ -85,12 +85,12 @@ void nx::ThreadInfoEntry::setMinPriority(uint8_t priority)
 	updateCapField();
 }
 
-uint8_t nx::ThreadInfoEntry::getMaxPriority() const
+uint8_t nn::hac::ThreadInfoEntry::getMaxPriority() const
 {
 	return mMaxPriority;
 }
 
-void nx::ThreadInfoEntry::setMaxPriority(uint8_t priority)
+void nn::hac::ThreadInfoEntry::setMaxPriority(uint8_t priority)
 {
 	if (priority > kMaxVal)
 	{
@@ -101,12 +101,12 @@ void nx::ThreadInfoEntry::setMaxPriority(uint8_t priority)
 	updateCapField();
 }
 
-uint8_t nx::ThreadInfoEntry::getMinCpuId() const
+uint8_t nn::hac::ThreadInfoEntry::getMinCpuId() const
 {
 	return mMinCpuId;
 }
 
-void nx::ThreadInfoEntry::setMinCpuId(uint8_t core_num)
+void nn::hac::ThreadInfoEntry::setMinCpuId(uint8_t core_num)
 {
 	if (core_num > kMaxVal)
 	{
@@ -117,12 +117,12 @@ void nx::ThreadInfoEntry::setMinCpuId(uint8_t core_num)
 	updateCapField();
 }
 
-uint8_t nx::ThreadInfoEntry::getMaxCpuId() const
+uint8_t nn::hac::ThreadInfoEntry::getMaxCpuId() const
 {
 	return mMaxCpuId;
 }
 
-void nx::ThreadInfoEntry::setMaxCpuId(uint8_t core_num)
+void nn::hac::ThreadInfoEntry::setMaxCpuId(uint8_t core_num)
 {
 	if (core_num > kMaxVal)
 	{
diff --git a/lib/libhac/source/ThreadInfoHandler.cpp b/lib/libhac/source/ThreadInfoHandler.cpp
index da906db..c0d8532 100644
--- a/lib/libhac/source/ThreadInfoHandler.cpp
+++ b/lib/libhac/source/ThreadInfoHandler.cpp
@@ -1,28 +1,28 @@
-#include <nx/ThreadInfoHandler.h>
+#include <nn/hac/ThreadInfoHandler.h>
 
-nx::ThreadInfoHandler::ThreadInfoHandler() :
+nn::hac::ThreadInfoHandler::ThreadInfoHandler() :
 	mIsSet(false),
 	mEntry(0,0,0,0)
 {}
 
-void nx::ThreadInfoHandler::operator=(const ThreadInfoHandler & other)
+void nn::hac::ThreadInfoHandler::operator=(const ThreadInfoHandler & other)
 {
 	mIsSet = other.mIsSet;
 	mEntry.setKernelCapability(other.mEntry.getKernelCapability());
 }
 
-bool nx::ThreadInfoHandler::operator==(const ThreadInfoHandler & other) const
+bool nn::hac::ThreadInfoHandler::operator==(const ThreadInfoHandler & other) const
 {
 	return (mIsSet == other.mIsSet) \
 		&& (mEntry.getKernelCapability() == other.mEntry.getKernelCapability());
 }
 
-bool nx::ThreadInfoHandler::operator!=(const ThreadInfoHandler & other) const
+bool nn::hac::ThreadInfoHandler::operator!=(const ThreadInfoHandler & other) const
 {
 	return !(*this == other);
 }
 
-void nx::ThreadInfoHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
+void nn::hac::ThreadInfoHandler::importKernelCapabilityList(const fnd::List<KernelCapabilityEntry>& caps)
 {
 	if (caps.size() > kMaxKernelCapNum)
 	{
@@ -36,7 +36,7 @@ void nx::ThreadInfoHandler::importKernelCapabilityList(const fnd::List<KernelCap
 	mIsSet = true;
 }
 
-void nx::ThreadInfoHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
+void nn::hac::ThreadInfoHandler::exportKernelCapabilityList(fnd::List<KernelCapabilityEntry>& caps) const
 {
 	if (isSet() == false)
 		return;
@@ -44,7 +44,7 @@ void nx::ThreadInfoHandler::exportKernelCapabilityList(fnd::List<KernelCapabilit
 	caps.addElement(mEntry.getKernelCapability());
 }
 
-void nx::ThreadInfoHandler::clear()
+void nn::hac::ThreadInfoHandler::clear()
 {
 	mIsSet = false;
 	mEntry.setMaxPriority(0);
@@ -53,50 +53,50 @@ void nx::ThreadInfoHandler::clear()
 	mEntry.setMinCpuId(0);
 }
 
-bool nx::ThreadInfoHandler::isSet() const
+bool nn::hac::ThreadInfoHandler::isSet() const
 {
 	return mIsSet;
 }
 
-uint8_t nx::ThreadInfoHandler::getMinPriority() const
+uint8_t nn::hac::ThreadInfoHandler::getMinPriority() const
 {
 	return mEntry.getMinPriority();
 }
 
-void nx::ThreadInfoHandler::setMinPriority(uint8_t priority)
+void nn::hac::ThreadInfoHandler::setMinPriority(uint8_t priority)
 {
 	mEntry.setMinPriority(priority);
 	mIsSet = true;
 }
 
-uint8_t nx::ThreadInfoHandler::getMaxPriority() const
+uint8_t nn::hac::ThreadInfoHandler::getMaxPriority() const
 {
 	return mEntry.getMaxPriority();
 }
 
-void nx::ThreadInfoHandler::setMaxPriority(uint8_t priority)
+void nn::hac::ThreadInfoHandler::setMaxPriority(uint8_t priority)
 {
 	mEntry.setMaxPriority(priority);
 	mIsSet = true;
 }
 
-uint8_t nx::ThreadInfoHandler::getMinCpuId() const
+uint8_t nn::hac::ThreadInfoHandler::getMinCpuId() const
 {
 	return mEntry.getMinCpuId();
 }
 
-void nx::ThreadInfoHandler::setMinCpuId(uint8_t core_num)
+void nn::hac::ThreadInfoHandler::setMinCpuId(uint8_t core_num)
 {
 	mEntry.setMinCpuId(core_num);
 	mIsSet = true;
 }
 
-uint8_t nx::ThreadInfoHandler::getMaxCpuId() const
+uint8_t nn::hac::ThreadInfoHandler::getMaxCpuId() const
 {
 	return mEntry.getMaxCpuId();
 }
 
-void nx::ThreadInfoHandler::setMaxCpuId(uint8_t core_num)
+void nn::hac::ThreadInfoHandler::setMaxCpuId(uint8_t core_num)
 {
 	mEntry.setMaxCpuId(core_num);
 	mIsSet = true;
diff --git a/lib/libhac/source/XciHeader.cpp b/lib/libhac/source/XciHeader.cpp
index a65b23b..390f529 100644
--- a/lib/libhac/source/XciHeader.cpp
+++ b/lib/libhac/source/XciHeader.cpp
@@ -1,16 +1,16 @@
-#include <nx/XciHeader.h>
+#include <nn/hac/XciHeader.h>
 
-nx::XciHeader::XciHeader()
+nn::hac::XciHeader::XciHeader()
 {
 	clear();
 }
 
-nx::XciHeader::XciHeader(const XciHeader& other)
+nn::hac::XciHeader::XciHeader(const XciHeader& other)
 {
 	*this = other;
 }
 
-void nx::XciHeader::operator=(const XciHeader& other)
+void nn::hac::XciHeader::operator=(const XciHeader& other)
 {
 	mRomAreaStartPage = other.mRomAreaStartPage;
 	mBackupAreaStartPage = other.mBackupAreaStartPage;
@@ -43,7 +43,7 @@ void nx::XciHeader::operator=(const XciHeader& other)
 	mUppId = other.mUppId;
 }
 
-bool nx::XciHeader::operator==(const XciHeader& other) const
+bool nn::hac::XciHeader::operator==(const XciHeader& other) const
 {
 	return	(mRomAreaStartPage == other.mRomAreaStartPage)
 		&&	(mBackupAreaStartPage == other.mBackupAreaStartPage)
@@ -76,17 +76,17 @@ bool nx::XciHeader::operator==(const XciHeader& other) const
 		&&	(mUppId == other.mUppId);
 }
 
-bool nx::XciHeader::operator!=(const XciHeader& other) const
+bool nn::hac::XciHeader::operator!=(const XciHeader& other) const
 {
 	return !(*this == other);
 }
 
-void nx::XciHeader::toBytes()
+void nn::hac::XciHeader::toBytes()
 {
 	fnd::Exception(kModuleName, "exportBinary() not implemented");
 }
 
-void nx::XciHeader::fromBytes(const byte_t* data, size_t len)
+void nn::hac::XciHeader::fromBytes(const byte_t* data, size_t len)
 {
 	// check input data size
 	if (len < sizeof(sXciHeader))
@@ -102,7 +102,7 @@ void nx::XciHeader::fromBytes(const byte_t* data, size_t len)
 	memcpy(mRawBinary.data(), data, mRawBinary.size());
 
 	// get sXciHeader ptr
-	const nx::sXciHeader* hdr = (const nx::sXciHeader*)mRawBinary.data();
+	const nn::hac::sXciHeader* hdr = (const nn::hac::sXciHeader*)mRawBinary.data();
 	
 	// check XCI signature
 	if (hdr->st_magic.get() != xci::kXciStructMagic)
@@ -148,13 +148,13 @@ void nx::XciHeader::fromBytes(const byte_t* data, size_t len)
 
 }
 
-const fnd::Vec<byte_t>& nx::XciHeader::getBytes() const
+const fnd::Vec<byte_t>& nn::hac::XciHeader::getBytes() const
 {
 	return mRawBinary;
 }
 
 // variables
-void nx::XciHeader::clear()
+void nn::hac::XciHeader::clear()
 {
 	mRomAreaStartPage = 0;
 	mBackupAreaStartPage = 0;
@@ -187,293 +187,293 @@ void nx::XciHeader::clear()
 	mUppId = 0;
 }
 
-uint32_t nx::XciHeader::getRomAreaStartPage() const
+uint32_t nn::hac::XciHeader::getRomAreaStartPage() const
 {
 	return mRomAreaStartPage;
 }
 
-void nx::XciHeader::setRomAreaStartPage(uint32_t startPage)
+void nn::hac::XciHeader::setRomAreaStartPage(uint32_t startPage)
 {
 	mRomAreaStartPage = startPage;
 }
 
-uint32_t nx::XciHeader::getBackupAreaStartPage() const
+uint32_t nn::hac::XciHeader::getBackupAreaStartPage() const
 {
 	return mBackupAreaStartPage;
 }
 
-void nx::XciHeader::setBackupAreaStartPage(uint32_t startPage)
+void nn::hac::XciHeader::setBackupAreaStartPage(uint32_t startPage)
 {
 	mBackupAreaStartPage = startPage;
 }
 
-byte_t nx::XciHeader::getKekIndex() const
+byte_t nn::hac::XciHeader::getKekIndex() const
 {
 	return mKekIndex;
 }
 
-void nx::XciHeader::setKekIndex(byte_t kekIndex)
+void nn::hac::XciHeader::setKekIndex(byte_t kekIndex)
 {
 	mKekIndex = kekIndex;
 }
 
-byte_t nx::XciHeader::getTitleKeyDecIndex() const
+byte_t nn::hac::XciHeader::getTitleKeyDecIndex() const
 {
 	return mTitleKeyDecIndex;
 }
 
-void nx::XciHeader::setTitleKeyDecIndex(byte_t index)
+void nn::hac::XciHeader::setTitleKeyDecIndex(byte_t index)
 {
 	mTitleKeyDecIndex = index;
 }
 
-byte_t nx::XciHeader::getRomSizeType() const
+byte_t nn::hac::XciHeader::getRomSizeType() const
 {
 	return mRomSize;
 }
 
-void nx::XciHeader::setRomSizeType(byte_t romSizeType)
+void nn::hac::XciHeader::setRomSizeType(byte_t romSizeType)
 {
 	mRomSize = romSizeType;
 }
 
-byte_t nx::XciHeader::getCardHeaderVersion() const
+byte_t nn::hac::XciHeader::getCardHeaderVersion() const
 {
 	return mCardHeaderVersion;
 }
 
-void nx::XciHeader::setCardHeaderVersion(byte_t version)
+void nn::hac::XciHeader::setCardHeaderVersion(byte_t version)
 {
 	mCardHeaderVersion = version;
 }
 
-byte_t nx::XciHeader::getFlags() const
+byte_t nn::hac::XciHeader::getFlags() const
 {
 	return mFlags;
 }
 
-void nx::XciHeader::setFlags(byte_t flags)
+void nn::hac::XciHeader::setFlags(byte_t flags)
 {
 	mFlags = flags;
 }
 
-uint64_t nx::XciHeader::getPackageId() const
+uint64_t nn::hac::XciHeader::getPackageId() const
 {
 	return mPackageId;
 }
 
-void nx::XciHeader::setPackageId(uint64_t id)
+void nn::hac::XciHeader::setPackageId(uint64_t id)
 {
 	mPackageId = id;
 }
 
-uint32_t nx::XciHeader::getValidDataEndPage() const
+uint32_t nn::hac::XciHeader::getValidDataEndPage() const
 {
 	return mValidDataEndPage;
 }
 
-void nx::XciHeader::setValidDataEndPage(uint32_t page)
+void nn::hac::XciHeader::setValidDataEndPage(uint32_t page)
 {
 	mValidDataEndPage = page;
 }
 
-const crypto::aes::sAesIvCtr& nx::XciHeader::getAesCbcIv() const
+const crypto::aes::sAesIvCtr& nn::hac::XciHeader::getAesCbcIv() const
 {
 	return mAesCbcIv;
 }
 
-void nx::XciHeader::setAesCbcIv(const crypto::aes::sAesIvCtr& iv)
+void nn::hac::XciHeader::setAesCbcIv(const crypto::aes::sAesIvCtr& iv)
 {
 	mAesCbcIv = iv;
 }
 
-uint64_t nx::XciHeader::getPartitionFsAddress() const
+uint64_t nn::hac::XciHeader::getPartitionFsAddress() const
 {
 	return mPartitionFsHeaderAddress;
 }
 
-void nx::XciHeader::setPartitionFsAddress(uint64_t address)
+void nn::hac::XciHeader::setPartitionFsAddress(uint64_t address)
 {
 	mPartitionFsHeaderAddress = address;
 }
 
-uint64_t nx::XciHeader::getPartitionFsSize() const
+uint64_t nn::hac::XciHeader::getPartitionFsSize() const
 {
 	return mPartitionFsHeaderSize;
 }
 
-void nx::XciHeader::setPartitionFsSize(uint64_t size)
+void nn::hac::XciHeader::setPartitionFsSize(uint64_t size)
 {
 	mPartitionFsHeaderSize = size;
 }
 
-const crypto::sha::sSha256Hash& nx::XciHeader::getPartitionFsHash() const
+const crypto::sha::sSha256Hash& nn::hac::XciHeader::getPartitionFsHash() const
 {
 	return mPartitionFsHeaderHash;
 }
 
-void nx::XciHeader::setPartitionFsHash(const crypto::sha::sSha256Hash& hash)
+void nn::hac::XciHeader::setPartitionFsHash(const crypto::sha::sSha256Hash& hash)
 {
 	mPartitionFsHeaderHash = hash;
 }
 
-const crypto::sha::sSha256Hash& nx::XciHeader::getInitialDataHash() const
+const crypto::sha::sSha256Hash& nn::hac::XciHeader::getInitialDataHash() const
 {
 	return mInitialDataHash;
 }
 
-void nx::XciHeader::setInitialDataHash(const crypto::sha::sSha256Hash& hash)
+void nn::hac::XciHeader::setInitialDataHash(const crypto::sha::sSha256Hash& hash)
 {
 	mInitialDataHash = hash;
 }
 
-uint32_t nx::XciHeader::getSelSec() const
+uint32_t nn::hac::XciHeader::getSelSec() const
 {
 	return mSelSec;
 }
 
-void nx::XciHeader::setSelSec(uint32_t sel_sec)
+void nn::hac::XciHeader::setSelSec(uint32_t sel_sec)
 {
 	mSelSec = sel_sec;
 }
 
-uint32_t nx::XciHeader::getSelT1Key() const
+uint32_t nn::hac::XciHeader::getSelT1Key() const
 {
 	return mSelT1Key;
 }
 
-void nx::XciHeader::setSelT1Key(uint32_t sel_t1_key)
+void nn::hac::XciHeader::setSelT1Key(uint32_t sel_t1_key)
 {
 	mSelT1Key = sel_t1_key;
 }
 
-uint32_t nx::XciHeader::getSelKey() const
+uint32_t nn::hac::XciHeader::getSelKey() const
 {
 	return mSelKey;
 }
 
-void nx::XciHeader::setSelKey(uint32_t sel_key)
+void nn::hac::XciHeader::setSelKey(uint32_t sel_key)
 {
 	mSelKey = sel_key;
 }
 
-uint32_t nx::XciHeader::getLimAreaPage() const
+uint32_t nn::hac::XciHeader::getLimAreaPage() const
 {
 	return mLimAreaPage;
 }
 
-void nx::XciHeader::setLimAreaPage(uint32_t page)
+void nn::hac::XciHeader::setLimAreaPage(uint32_t page)
 {
 	mLimAreaPage = page;
 }
 
 
-uint32_t nx::XciHeader::getFwVerMajor() const
+uint32_t nn::hac::XciHeader::getFwVerMajor() const
 {
 	return mFwVersion[xci::FWVER_MAJOR];
 }
 
-void nx::XciHeader::setFwVerMajor(uint32_t ver)
+void nn::hac::XciHeader::setFwVerMajor(uint32_t ver)
 {
 	mFwVersion[xci::FWVER_MAJOR] = ver;
 }
 
-uint32_t nx::XciHeader::getFwVerMinor() const
+uint32_t nn::hac::XciHeader::getFwVerMinor() const
 {
 	return mFwVersion[xci::FWVER_MINOR];
 }
 
-void nx::XciHeader::setFwVerMinor(uint32_t ver)
+void nn::hac::XciHeader::setFwVerMinor(uint32_t ver)
 {
 	mFwVersion[xci::FWVER_MINOR] = ver;
 }
 
-uint32_t nx::XciHeader::getAccCtrl1() const
+uint32_t nn::hac::XciHeader::getAccCtrl1() const
 {
 	return mAccCtrl1;
 }
 
-void nx::XciHeader::setAccCtrl1(uint32_t acc_ctrl_1)
+void nn::hac::XciHeader::setAccCtrl1(uint32_t acc_ctrl_1)
 {
 	mAccCtrl1 = acc_ctrl_1;
 }
 
-uint32_t nx::XciHeader::getWait1TimeRead() const
+uint32_t nn::hac::XciHeader::getWait1TimeRead() const
 {
 	return mWait1TimeRead;
 }
 
-void nx::XciHeader::setWait1TimeRead(uint32_t seconds)
+void nn::hac::XciHeader::setWait1TimeRead(uint32_t seconds)
 {
 	mWait1TimeRead = seconds;
 }
 
-uint32_t nx::XciHeader::getWait2TimeRead() const
+uint32_t nn::hac::XciHeader::getWait2TimeRead() const
 {
 	return mWait2TimeRead;
 }
 
-void nx::XciHeader::setWait2TimeRead(uint32_t seconds)
+void nn::hac::XciHeader::setWait2TimeRead(uint32_t seconds)
 {
 	mWait2TimeRead = seconds;
 }
 
-uint32_t nx::XciHeader::getWait1TimeWrite() const
+uint32_t nn::hac::XciHeader::getWait1TimeWrite() const
 {
 	return mWait1TimeWrite;
 }
 
-void nx::XciHeader::setWait1TimeWrite(uint32_t seconds)
+void nn::hac::XciHeader::setWait1TimeWrite(uint32_t seconds)
 {
 	mWait1TimeWrite = seconds;
 }
 
-uint32_t nx::XciHeader::getWait2TimeWrite() const
+uint32_t nn::hac::XciHeader::getWait2TimeWrite() const
 {
 	return mWait2TimeWrite;
 }
 
-void nx::XciHeader::setWait2TimeWrite(uint32_t seconds)
+void nn::hac::XciHeader::setWait2TimeWrite(uint32_t seconds)
 {
 	mWait2TimeWrite = seconds;
 }
 
-uint32_t nx::XciHeader::getFwMode() const
+uint32_t nn::hac::XciHeader::getFwMode() const
 {
 	return mFwMode;
 }
 
-void nx::XciHeader::setFwMode(uint32_t fw_mode)
+void nn::hac::XciHeader::setFwMode(uint32_t fw_mode)
 {
 	mFwMode = fw_mode;
 }
 
-uint32_t nx::XciHeader::getUppVersion() const
+uint32_t nn::hac::XciHeader::getUppVersion() const
 {
 	return mUppVersion;
 }
 
-void nx::XciHeader::setUppVersion(uint32_t version)
+void nn::hac::XciHeader::setUppVersion(uint32_t version)
 {
 	mUppVersion = version;
 }
 
-const byte_t* nx::XciHeader::getUppHash() const
+const byte_t* nn::hac::XciHeader::getUppHash() const
 {
 	return mUppHash;
 }
 
-void nx::XciHeader::setUppHash(const byte_t* hash)
+void nn::hac::XciHeader::setUppHash(const byte_t* hash)
 {
 	memcpy(mUppHash, hash, xci::kUppHashLen);
 }
 
-uint64_t nx::XciHeader::getUppId() const
+uint64_t nn::hac::XciHeader::getUppId() const
 {
 	return mUppId;
 }
 
-void nx::XciHeader::setUppId(uint64_t id)
+void nn::hac::XciHeader::setUppId(uint64_t id)
 {
 	mUppId = id;
 }
diff --git a/lib/libhac/source/XciUtils.cpp b/lib/libhac/source/XciUtils.cpp
index 756725b..40aa00a 100644
--- a/lib/libhac/source/XciUtils.cpp
+++ b/lib/libhac/source/XciUtils.cpp
@@ -1,6 +1,6 @@
-#include <nx/XciUtils.h>
+#include <nn/hac/XciUtils.h>
 
-void nx::XciUtils::getXciHeaderAesIv(const nx::sXciHeader* hdr, byte_t* iv)
+void nn::hac::XciUtils::getXciHeaderAesIv(const nn::hac::sXciHeader* hdr, byte_t* iv)
 {
 	for (size_t i = 0; i < 16; i++)
 	{
@@ -8,15 +8,15 @@ void nx::XciUtils::getXciHeaderAesIv(const nx::sXciHeader* hdr, byte_t* iv)
 	}
 }
 
-void nx::XciUtils::decryptXciHeader(const byte_t* src, byte_t* dst, const byte_t* key)
+void nn::hac::XciUtils::decryptXciHeader(const byte_t* src, byte_t* dst, const byte_t* key)
 {
 	byte_t iv[crypto::aes::kAesBlockSize];
 
-	getXciHeaderAesIv((const nx::sXciHeader*)src, iv);
+	getXciHeaderAesIv((const nn::hac::sXciHeader*)src, iv);
 
 	// copy plain
-	memcpy(dst, src, nx::xci::kHeaderEncOffset);
+	memcpy(dst, src, nn::hac::xci::kHeaderEncOffset);
 
 	// decrypt encrypted data
-	crypto::aes::AesCbcDecrypt(src + nx::xci::kHeaderEncOffset, nx::xci::kHeaderEncSize, key, iv, dst + nx::xci::kHeaderEncOffset);
+	crypto::aes::AesCbcDecrypt(src + nn::hac::xci::kHeaderEncOffset, nn::hac::xci::kHeaderEncSize, key, iv, dst + nn::hac::xci::kHeaderEncOffset);
 }
\ No newline at end of file
diff --git a/lib/liblz4/makefile b/lib/liblz4/makefile
index a29d7be..b6fc4ef 100644
--- a/lib/liblz4/makefile
+++ b/lib/liblz4/makefile
@@ -39,7 +39,7 @@ main: build
 rebuild: clean build
 
 build: $(OBJS)
-	ar cr -o $(OUTPUT) $(OBJS)
+	ar $(ARFLAGS) $(OUTPUT) $(OBJS)
 
 clean:
 	rm -rf $(OUTPUT) $(OBJS)
\ No newline at end of file
diff --git a/lib/libpki/include/nn/pki/CertificateBody.h b/lib/libpki/include/nn/pki/CertificateBody.h
index c02494c..497cca1 100644
--- a/lib/libpki/include/nn/pki/CertificateBody.h
+++ b/lib/libpki/include/nn/pki/CertificateBody.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <string>
 #include <fnd/ISerialisable.h>
-#include <pki/cert.h>
+#include <nn/pki/cert.h>
 
+namespace nn
+{
 namespace pki
 {
 	class CertificateBody
@@ -61,4 +63,5 @@ namespace pki
 		crypto::rsa::sRsa2048Key mRsa2048PublicKey;
 		crypto::ecdsa::sEcdsa240Point mEcdsa240PublicKey;
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libpki/include/nn/pki/SignUtils.h b/lib/libpki/include/nn/pki/SignUtils.h
index dc71e2a..873ff41 100644
--- a/lib/libpki/include/nn/pki/SignUtils.h
+++ b/lib/libpki/include/nn/pki/SignUtils.h
@@ -1,14 +1,17 @@
 #pragma once
-#include <pki/sign.h>
+#include <nn/pki/sign.h>
 #include <crypto/sha.h>
 
+namespace nn
+{
 namespace pki
 {
 
 namespace sign
 {
-	pki::sign::SignatureAlgo getSignatureAlgo(pki::sign::SignatureId sign_id);
-	pki::sign::HashAlgo getHashAlgo(pki::sign::SignatureId sign_id);
+	nn::pki::sign::SignatureAlgo getSignatureAlgo(pki::sign::SignatureId sign_id);
+	nn::pki::sign::HashAlgo getHashAlgo(pki::sign::SignatureId sign_id);
 }
 	
+}
 }
\ No newline at end of file
diff --git a/lib/libpki/include/nn/pki/SignatureBlock.h b/lib/libpki/include/nn/pki/SignatureBlock.h
index 1fcad69..0b2ed71 100644
--- a/lib/libpki/include/nn/pki/SignatureBlock.h
+++ b/lib/libpki/include/nn/pki/SignatureBlock.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <string>
 #include <fnd/ISerialisable.h>
-#include <pki/sign.h>
+#include <nn/pki/sign.h>
 
+namespace nn
+{
 namespace pki
 {
 	class SignatureBlock
@@ -45,4 +47,5 @@ namespace pki
 		bool mIsLittleEndian;
 		fnd::Vec<byte_t> mSignature;
 	};
+}
 }
\ No newline at end of file
diff --git a/lib/libpki/include/nn/pki/SignedData.h b/lib/libpki/include/nn/pki/SignedData.h
index abe38d6..112e9f9 100644
--- a/lib/libpki/include/nn/pki/SignedData.h
+++ b/lib/libpki/include/nn/pki/SignedData.h
@@ -1,8 +1,10 @@
 #pragma once
 #include <string>
 #include <fnd/ISerialisable.h>
-#include <pki/SignatureBlock.h>
+#include <nn/pki/SignatureBlock.h>
 
+namespace nn
+{
 namespace pki
 {
 	template <class T>
diff --git a/lib/libpki/include/nn/pki/cert.h b/lib/libpki/include/nn/pki/cert.h
index c7e3b52..1fd7a1b 100644
--- a/lib/libpki/include/nn/pki/cert.h
+++ b/lib/libpki/include/nn/pki/cert.h
@@ -5,6 +5,8 @@
 #include <crypto/rsa.h>
 #include <crypto/ecdsa.h>
 
+namespace nn
+{
 namespace pki
 {
 	namespace cert
@@ -48,4 +50,5 @@ namespace pki
 		byte_t padding[0x3C];
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libpki/include/nn/pki/sign.h b/lib/libpki/include/nn/pki/sign.h
index 27442cc..7d31f35 100644
--- a/lib/libpki/include/nn/pki/sign.h
+++ b/lib/libpki/include/nn/pki/sign.h
@@ -5,6 +5,8 @@
 #include <crypto/rsa.h>
 #include <crypto/ecdsa.h>
 
+namespace nn
+{
 namespace pki
 {
 	namespace sign
@@ -59,4 +61,5 @@ namespace pki
 		byte_t padding[0x40];
 	};
 #pragma pack(pop)
+}
 }
\ No newline at end of file
diff --git a/lib/libpki/makefile b/lib/libpki/makefile
index a6d2bf8..da68d0b 100644
--- a/lib/libpki/makefile
+++ b/lib/libpki/makefile
@@ -21,15 +21,14 @@ else
 	UNAME = $(shell uname -s)
 	ifeq ($(UNAME), Darwin)
 		# MacOS Only Flags/Libs
-		CFLAGS += -Wno-unused-private-field
-		CXXFLAGS += -Wno-unused-private-field
+		CFLAGS += -arch x86_64 -Wno-unused-private-field
+		CXXFLAGS += -arch x86_64 -Wno-unused-private-field
 		ARFLAGS = rc
 	else
 		# *nix Only Flags/Libs
 		CFLAGS += -Wno-unused-but-set-variable
 		CXXFLAGS += -Wno-unused-but-set-variable
 	endif
-
 endif
 
 # Output
diff --git a/lib/libpki/source/CertificateBody.cpp b/lib/libpki/source/CertificateBody.cpp
index d844101..bcf3d03 100644
--- a/lib/libpki/source/CertificateBody.cpp
+++ b/lib/libpki/source/CertificateBody.cpp
@@ -1,16 +1,16 @@
-#include <pki/CertificateBody.h>
+#include <nn/pki/CertificateBody.h>
 
-pki::CertificateBody::CertificateBody()
+nn::pki::CertificateBody::CertificateBody()
 {
 	clear();
 }
 
-pki::CertificateBody::CertificateBody(const CertificateBody& other)
+nn::pki::CertificateBody::CertificateBody(const CertificateBody& other)
 {
 	*this = other;
 }
 
-void pki::CertificateBody::operator=(const CertificateBody& other)
+void nn::pki::CertificateBody::operator=(const CertificateBody& other)
 {
 	mRawBinary = other.mRawBinary;
 	mIssuer = other.mIssuer;
@@ -22,7 +22,7 @@ void pki::CertificateBody::operator=(const CertificateBody& other)
 	mEcdsa240PublicKey = other.mEcdsa240PublicKey;
 }
 
-bool pki::CertificateBody::operator==(const CertificateBody& other) const
+bool nn::pki::CertificateBody::operator==(const CertificateBody& other) const
 {
 	return (mIssuer == other.mIssuer) \
 		&& (mSubject == other.mSubject) \
@@ -33,12 +33,12 @@ bool pki::CertificateBody::operator==(const CertificateBody& other) const
 		&& (mEcdsa240PublicKey == other.mEcdsa240PublicKey);
 }
 
-bool pki::CertificateBody::operator!=(const CertificateBody& other) const
+bool nn::pki::CertificateBody::operator!=(const CertificateBody& other) const
 {
 	return !(*this == other);
 }
 
-void pki::CertificateBody::toBytes()
+void nn::pki::CertificateBody::toBytes()
 {
 	// get public key size
 	size_t pubkeySize = 0;
@@ -86,7 +86,7 @@ void pki::CertificateBody::toBytes()
 	}
 }
 
-void pki::CertificateBody::fromBytes(const byte_t* src, size_t size)
+void nn::pki::CertificateBody::fromBytes(const byte_t* src, size_t size)
 {
 	clear();
 
@@ -155,13 +155,13 @@ void pki::CertificateBody::fromBytes(const byte_t* src, size_t size)
 	}
 }
 
-const fnd::Vec<byte_t>& pki::CertificateBody::getBytes() const
+const fnd::Vec<byte_t>& nn::pki::CertificateBody::getBytes() const
 {
 	return mRawBinary;
 }
 
 
-void pki::CertificateBody::clear()
+void nn::pki::CertificateBody::clear()
 {
 	mIssuer.clear();
 	mSubject.clear();
@@ -173,12 +173,12 @@ void pki::CertificateBody::clear()
 	memset(&mEcdsa240PublicKey, 0, sizeof(crypto::ecdsa::sEcdsa240Point));
 }
 
-const std::string& pki::CertificateBody::getIssuer() const
+const std::string& nn::pki::CertificateBody::getIssuer() const
 {
 	return mIssuer;
 }
 
-void pki::CertificateBody::setIssuer(const std::string& issuer)
+void nn::pki::CertificateBody::setIssuer(const std::string& issuer)
 {
 	if (issuer.size() > cert::kIssuerSize)
 	{
@@ -188,22 +188,22 @@ void pki::CertificateBody::setIssuer(const std::string& issuer)
 	mIssuer = issuer;
 }
 
-pki::cert::PublicKeyType pki::CertificateBody::getPublicKeyType() const
+nn::pki::cert::PublicKeyType nn::pki::CertificateBody::getPublicKeyType() const
 {
 	return mPublicKeyType;
 }
 
-void pki::CertificateBody::setPublicKeyType(cert::PublicKeyType type)
+void nn::pki::CertificateBody::setPublicKeyType(cert::PublicKeyType type)
 {
 	mPublicKeyType = type;
 }
 
-const std::string& pki::CertificateBody::getSubject() const
+const std::string& nn::pki::CertificateBody::getSubject() const
 {
 	return mSubject;
 }
 
-void pki::CertificateBody::setSubject(const std::string& subject)
+void nn::pki::CertificateBody::setSubject(const std::string& subject)
 {
 	if (subject.size() > cert::kSubjectSize)
 	{
@@ -213,42 +213,42 @@ void pki::CertificateBody::setSubject(const std::string& subject)
 	mSubject = subject;
 }
 
-uint32_t pki::CertificateBody::getCertId() const
+uint32_t nn::pki::CertificateBody::getCertId() const
 {
 	return mCertId;
 }
 
-void pki::CertificateBody::setCertId(uint32_t id)
+void nn::pki::CertificateBody::setCertId(uint32_t id)
 {
 	mCertId = id;
 }
 
-const crypto::rsa::sRsa4096Key& pki::CertificateBody::getRsa4098PublicKey() const
+const crypto::rsa::sRsa4096Key& nn::pki::CertificateBody::getRsa4098PublicKey() const
 {
 	return mRsa4096PublicKey;
 }
 
-void pki::CertificateBody::setRsa4098PublicKey(const crypto::rsa::sRsa4096Key& key)
+void nn::pki::CertificateBody::setRsa4098PublicKey(const crypto::rsa::sRsa4096Key& key)
 {
 	mRsa4096PublicKey = key;
 }
 
-const crypto::rsa::sRsa2048Key& pki::CertificateBody::getRsa2048PublicKey() const
+const crypto::rsa::sRsa2048Key& nn::pki::CertificateBody::getRsa2048PublicKey() const
 {
 	return mRsa2048PublicKey;
 }
 
-void pki::CertificateBody::setRsa2048PublicKey(const crypto::rsa::sRsa2048Key& key)
+void nn::pki::CertificateBody::setRsa2048PublicKey(const crypto::rsa::sRsa2048Key& key)
 {
 	mRsa2048PublicKey = key;
 }
 
-const crypto::ecdsa::sEcdsa240Point& pki::CertificateBody::getEcdsa240PublicKey() const
+const crypto::ecdsa::sEcdsa240Point& nn::pki::CertificateBody::getEcdsa240PublicKey() const
 {
 	return mEcdsa240PublicKey;
 }
 
-void pki::CertificateBody::setEcdsa240PublicKey(const crypto::ecdsa::sEcdsa240Point& key)
+void nn::pki::CertificateBody::setEcdsa240PublicKey(const crypto::ecdsa::sEcdsa240Point& key)
 {
 	mEcdsa240PublicKey = key;
 }
\ No newline at end of file
diff --git a/lib/libpki/source/SignUtils.cpp b/lib/libpki/source/SignUtils.cpp
index 43cfb1e..56ff86d 100644
--- a/lib/libpki/source/SignUtils.cpp
+++ b/lib/libpki/source/SignUtils.cpp
@@ -1,21 +1,21 @@
-#include <pki/SignUtils.h>
+#include <nn/pki/SignUtils.h>
 
-pki::sign::SignatureAlgo pki::sign::getSignatureAlgo(pki::sign::SignatureId sign_id)
+nn::pki::sign::SignatureAlgo nn::pki::sign::getSignatureAlgo(nn::pki::sign::SignatureId sign_id)
 {
 	SignatureAlgo sign_algo = SIGN_ALGO_RSA4096;
 
 	switch (sign_id)
 	{
-	case (pki::sign::SIGN_ID_RSA4096_SHA1):
-	case (pki::sign::SIGN_ID_RSA4096_SHA256):
+	case (nn::pki::sign::SIGN_ID_RSA4096_SHA1):
+	case (nn::pki::sign::SIGN_ID_RSA4096_SHA256):
 		sign_algo = SIGN_ALGO_RSA4096;
 		break;
-	case (pki::sign::SIGN_ID_RSA2048_SHA1):
-	case (pki::sign::SIGN_ID_RSA2048_SHA256):
+	case (nn::pki::sign::SIGN_ID_RSA2048_SHA1):
+	case (nn::pki::sign::SIGN_ID_RSA2048_SHA256):
 		sign_algo = SIGN_ALGO_RSA2048;
 		break;
-	case (pki::sign::SIGN_ID_ECDSA240_SHA1):
-	case (pki::sign::SIGN_ID_ECDSA240_SHA256):
+	case (nn::pki::sign::SIGN_ID_ECDSA240_SHA1):
+	case (nn::pki::sign::SIGN_ID_ECDSA240_SHA256):
 		sign_algo = SIGN_ALGO_ECDSA240;
 		break;
 	};
@@ -23,20 +23,20 @@ pki::sign::SignatureAlgo pki::sign::getSignatureAlgo(pki::sign::SignatureId sign
 	return sign_algo;
 }
 
-pki::sign::HashAlgo pki::sign::getHashAlgo(pki::sign::SignatureId sign_id)
+nn::pki::sign::HashAlgo nn::pki::sign::getHashAlgo(nn::pki::sign::SignatureId sign_id)
 {
 	HashAlgo hash_algo = HASH_ALGO_SHA1;
 
 	switch (sign_id)
 	{
-	case (pki::sign::SIGN_ID_RSA4096_SHA1):
-	case (pki::sign::SIGN_ID_RSA2048_SHA1):
-	case (pki::sign::SIGN_ID_ECDSA240_SHA1):
+	case (nn::pki::sign::SIGN_ID_RSA4096_SHA1):
+	case (nn::pki::sign::SIGN_ID_RSA2048_SHA1):
+	case (nn::pki::sign::SIGN_ID_ECDSA240_SHA1):
 		hash_algo = HASH_ALGO_SHA1;
 		break;
-	case (pki::sign::SIGN_ID_RSA4096_SHA256):
-	case (pki::sign::SIGN_ID_RSA2048_SHA256):
-	case (pki::sign::SIGN_ID_ECDSA240_SHA256):
+	case (nn::pki::sign::SIGN_ID_RSA4096_SHA256):
+	case (nn::pki::sign::SIGN_ID_RSA2048_SHA256):
+	case (nn::pki::sign::SIGN_ID_ECDSA240_SHA256):
 		hash_algo = HASH_ALGO_SHA256;
 		break;
 	};
diff --git a/lib/libpki/source/SignatureBlock.cpp b/lib/libpki/source/SignatureBlock.cpp
index bf19b20..b25944a 100644
--- a/lib/libpki/source/SignatureBlock.cpp
+++ b/lib/libpki/source/SignatureBlock.cpp
@@ -1,16 +1,16 @@
-#include <pki/SignatureBlock.h>
+#include <nn/pki/SignatureBlock.h>
 
-pki::SignatureBlock::SignatureBlock()
+nn::pki::SignatureBlock::SignatureBlock()
 {
 	clear();
 }
 
-pki::SignatureBlock::SignatureBlock(const SignatureBlock& other)
+nn::pki::SignatureBlock::SignatureBlock(const SignatureBlock& other)
 {
 	*this = other;
 }
 
-void pki::SignatureBlock::operator=(const SignatureBlock& other)
+void nn::pki::SignatureBlock::operator=(const SignatureBlock& other)
 {
 	mRawBinary = other.mRawBinary;
 	mSignType = other.mSignType;
@@ -18,19 +18,19 @@ void pki::SignatureBlock::operator=(const SignatureBlock& other)
 	mSignature = other.mSignature;
 }
 
-bool pki::SignatureBlock::operator==(const SignatureBlock& other) const
+bool nn::pki::SignatureBlock::operator==(const SignatureBlock& other) const
 {
 	return (mSignType == other.mSignType) \
 		&& (mIsLittleEndian == other.mIsLittleEndian) \
 		&& (mSignature == other.mSignature);
 }
 
-bool pki::SignatureBlock::operator!=(const SignatureBlock& other) const
+bool nn::pki::SignatureBlock::operator!=(const SignatureBlock& other) const
 {
 	return !(*this == other);
 }
 
-void pki::SignatureBlock::toBytes()
+void nn::pki::SignatureBlock::toBytes()
 {
 	size_t totalSize = 0;
 	size_t sigSize = 0;
@@ -68,7 +68,7 @@ void pki::SignatureBlock::toBytes()
 	memcpy(mRawBinary.data() + 4, mSignature.data(), sigSize);
 }
 
-void pki::SignatureBlock::fromBytes(const byte_t* src, size_t size)
+void nn::pki::SignatureBlock::fromBytes(const byte_t* src, size_t size)
 {
 	clear();
 
@@ -138,12 +138,12 @@ void pki::SignatureBlock::fromBytes(const byte_t* src, size_t size)
 	memcpy(mSignature.data(), mRawBinary.data() + 4, sigSize);
 }
 
-const fnd::Vec<byte_t>& pki::SignatureBlock::getBytes() const
+const fnd::Vec<byte_t>& nn::pki::SignatureBlock::getBytes() const
 {
 	return mRawBinary;
 }
 
-void pki::SignatureBlock::clear()
+void nn::pki::SignatureBlock::clear()
 {
 	mRawBinary.clear();
 	mSignType = sign::SIGN_ID_RSA4096_SHA1;
@@ -151,32 +151,32 @@ void pki::SignatureBlock::clear()
 	mSignature.clear();
 }
 
-pki::sign::SignatureId pki::SignatureBlock::getSignType() const
+nn::pki::sign::SignatureId nn::pki::SignatureBlock::getSignType() const
 {
 	return mSignType;
 }
 
-void pki::SignatureBlock::setSignType(pki::sign::SignatureId type)
+void nn::pki::SignatureBlock::setSignType(nn::pki::sign::SignatureId type)
 {
 	mSignType = type;
 }
 
-bool pki::SignatureBlock::isLittleEndian() const
+bool nn::pki::SignatureBlock::isLittleEndian() const
 {
 	return mIsLittleEndian;
 }
 
-void pki::SignatureBlock::setLittleEndian(bool isLE)
+void nn::pki::SignatureBlock::setLittleEndian(bool isLE)
 {
 	mIsLittleEndian = isLE;
 }
 
-const fnd::Vec<byte_t>& pki::SignatureBlock::getSignature() const
+const fnd::Vec<byte_t>& nn::pki::SignatureBlock::getSignature() const
 {
 	return mSignature;
 }
 
-void pki::SignatureBlock::setSignature(const fnd::Vec<byte_t>& signature)
+void nn::pki::SignatureBlock::setSignature(const fnd::Vec<byte_t>& signature)
 {
 	mSignature = signature;
 }
diff --git a/lib/libpolarssl/makefile b/lib/libpolarssl/makefile
index 1507e0e..2c2becf 100644
--- a/lib/libpolarssl/makefile
+++ b/lib/libpolarssl/makefile
@@ -39,7 +39,7 @@ main: build
 rebuild: clean build
 
 build: $(OBJS)
-	ar cr -o $(OUTPUT) $(OBJS)
+	ar $(ARFLAGS) $(OUTPUT) $(OBJS)
 
 clean:
 	rm -rf $(OUTPUT) $(OBJS)
\ No newline at end of file
diff --git a/programs/nstool/source/AssetProcess.cpp b/programs/nstool/source/AssetProcess.cpp
index 65d759c..ef48adf 100644
--- a/programs/nstool/source/AssetProcess.cpp
+++ b/programs/nstool/source/AssetProcess.cpp
@@ -74,12 +74,12 @@ void AssetProcess::setRomfsExtractPath(const std::string& path)
 void AssetProcess::importHeader()
 {
 	fnd::Vec<byte_t> scratch;
-	if (mFile->size() < sizeof(nx::sAssetHeader))
+	if (mFile->size() < sizeof(nn::hac::sAssetHeader))
 	{
 		throw fnd::Exception(kModuleName, "Corrupt ASET: file too small");
 	}
 
-	scratch.alloc(sizeof(nx::sAssetHeader));
+	scratch.alloc(sizeof(nn::hac::sAssetHeader));
 	mFile->read(scratch.data(), 0, scratch.size());
 
 	mHdr.fromBytes(scratch.data(), scratch.size());
diff --git a/programs/nstool/source/AssetProcess.h b/programs/nstool/source/AssetProcess.h
index 4e1b707..aae5177 100644
--- a/programs/nstool/source/AssetProcess.h
+++ b/programs/nstool/source/AssetProcess.h
@@ -2,7 +2,7 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/IFile.h>
-#include <nx/AssetHeader.h>
+#include <nn/hac/AssetHeader.h>
 #include "NacpProcess.h"
 #include "RomfsProcess.h"
 
@@ -38,7 +38,7 @@ private:
 	sOptional<std::string> mIconExtractPath;
 	sOptional<std::string> mNacpExtractPath;
 
-	nx::AssetHeader mHdr;
+	nn::hac::AssetHeader mHdr;
 	NacpProcess mNacp;
 	RomfsProcess mRomfs;
 
diff --git a/programs/nstool/source/CnmtProcess.cpp b/programs/nstool/source/CnmtProcess.cpp
index 8f2e95d..1606a9d 100644
--- a/programs/nstool/source/CnmtProcess.cpp
+++ b/programs/nstool/source/CnmtProcess.cpp
@@ -73,27 +73,27 @@ void CnmtProcess::displayCmnt()
 	printf("  Version:               v%" PRId32 " (%d.%d.%d.%d)\n", (uint32_t)mCnmt.getTitleVersion(), _SPLIT_VER(mCnmt.getTitleVersion()));
 	printf("  Type:                  %s (%d)\n", getContentMetaTypeStr(mCnmt.getType()), mCnmt.getType());
 	printf("  Attributes:            %x\n", mCnmt.getAttributes());
-	printf("    IncludesExFatDriver: %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nx::cnmt::ATTRIBUTE_INCLUDES_EX_FAT_DRIVER)));
-	printf("    Rebootless:          %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nx::cnmt::ATTRIBUTE_REBOOTLESS)));
+	printf("    IncludesExFatDriver: %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nn::hac::cnmt::ATTRIBUTE_INCLUDES_EX_FAT_DRIVER)));
+	printf("    Rebootless:          %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nn::hac::cnmt::ATTRIBUTE_REBOOTLESS)));
 	printf("  RequiredDownloadSystemVersion: v%" PRId32 " (%d.%d.%d.%d)\n", (uint32_t)mCnmt.getRequiredDownloadSystemVersion(), _SPLIT_VER(mCnmt.getRequiredDownloadSystemVersion()));
 	switch(mCnmt.getType())
 	{
-		case (nx::cnmt::METATYPE_APPLICATION):
+		case (nn::hac::cnmt::METATYPE_APPLICATION):
 			printf("  ApplicationExtendedHeader:\n");
 			printf("    RequiredSystemVersion: v%" PRId32 " (%d.%d.%d.%d)\n", (uint32_t)mCnmt.getApplicationMetaExtendedHeader().required_system_version, _SPLIT_VER(mCnmt.getApplicationMetaExtendedHeader().required_system_version));
 			printf("    PatchId:               0x%016" PRIx64 "\n", (uint64_t)mCnmt.getApplicationMetaExtendedHeader().patch_id);
 			break;
-		case (nx::cnmt::METATYPE_PATCH):
+		case (nn::hac::cnmt::METATYPE_PATCH):
 			printf("  PatchMetaExtendedHeader:\n");
 			printf("    RequiredSystemVersion: v%" PRId32 " (%d.%d.%d.%d))\n", (uint32_t)mCnmt.getPatchMetaExtendedHeader().required_system_version, _SPLIT_VER(mCnmt.getPatchMetaExtendedHeader().required_system_version));
 			printf("    ApplicationId:         0x%016" PRIx64 "\n", (uint64_t)mCnmt.getPatchMetaExtendedHeader().application_id);
 			break;
-		case (nx::cnmt::METATYPE_ADD_ON_CONTENT):
+		case (nn::hac::cnmt::METATYPE_ADD_ON_CONTENT):
 			printf("  AddOnContentMetaExtendedHeader:\n");
 			printf("    RequiredSystemVersion: v%" PRId32 " (%d.%d.%d.%d)\n", (uint32_t)mCnmt.getAddOnContentMetaExtendedHeader().required_system_version, _SPLIT_VER(mCnmt.getAddOnContentMetaExtendedHeader().required_system_version));
 			printf("    ApplicationId:         0x%016" PRIx64 "\n", (uint64_t)mCnmt.getAddOnContentMetaExtendedHeader().application_id);
 			break;
-		case (nx::cnmt::METATYPE_DELTA):
+		case (nn::hac::cnmt::METATYPE_DELTA):
 			printf("  DeltaMetaExtendedHeader:\n");
 			printf("    ApplicationId:         0x%016" PRIx64 "\n", (uint64_t)mCnmt.getDeltaMetaExtendedHeader().application_id);
 			break;
@@ -105,11 +105,11 @@ void CnmtProcess::displayCmnt()
 		printf("  ContentInfo:\n");
 		for (size_t i = 0; i < mCnmt.getContentInfo().size(); i++)
 		{
-			const nx::ContentMetaBinary::ContentInfo& info = mCnmt.getContentInfo()[i];
+			const nn::hac::ContentMetaBinary::ContentInfo& info = mCnmt.getContentInfo()[i];
 			printf("    %d\n", (int)i);
 			printf("      Type:         %s (%d)\n", getContentTypeStr(info.type), info.type);
 			printf("      Id:           ");
-			_HEXDUMP_L(info.nca_id, nx::cnmt::kContentIdLen);
+			_HEXDUMP_L(info.nca_id, nn::hac::cnmt::kContentIdLen);
 			printf("\n");
 			printf("      Size:         0x%" PRIx64 "\n", (uint64_t)info.size);
 			printf("      Hash:         ");
@@ -122,18 +122,18 @@ void CnmtProcess::displayCmnt()
 		printf("  ContentMetaInfo:\n");
 		for (size_t i = 0; i < mCnmt.getContentMetaInfo().size(); i++)
 		{
-			const nx::ContentMetaBinary::ContentMetaInfo& info = mCnmt.getContentMetaInfo()[i];
+			const nn::hac::ContentMetaBinary::ContentMetaInfo& info = mCnmt.getContentMetaInfo()[i];
 			printf("    %d\n", (int)i);
 			printf("      Id:           0x%016" PRIx64 "\n", (uint64_t)info.id);
 			printf("      Version:      v%" PRId32 " (%d.%d.%d.%d)\n", (uint32_t)info.version, _SPLIT_VER(info.version));
 			printf("      Type:         %s (%d)\n", getContentMetaTypeStr(info.type), info.type);
 			printf("      Attributes:   %x\n", mCnmt.getAttributes());
-			printf("        IncludesExFatDriver: %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nx::cnmt::ATTRIBUTE_INCLUDES_EX_FAT_DRIVER)));
-			printf("        Rebootless:          %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nx::cnmt::ATTRIBUTE_REBOOTLESS)));
+			printf("        IncludesExFatDriver: %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nn::hac::cnmt::ATTRIBUTE_INCLUDES_EX_FAT_DRIVER)));
+			printf("        Rebootless:          %s\n", getBoolStr(_HAS_BIT(mCnmt.getAttributes(), nn::hac::cnmt::ATTRIBUTE_REBOOTLESS)));
 		}
 	}
 	printf("  Digest:   ");
-	_HEXDUMP_L(mCnmt.getDigest().data, nx::cnmt::kDigestLen);
+	_HEXDUMP_L(mCnmt.getDigest().data, nn::hac::cnmt::kDigestLen);
 	printf("\n");
 
 #undef _HEXDUMP_L
@@ -191,7 +191,7 @@ void CnmtProcess::setVerifyMode(bool verify)
 	mVerify = verify;
 }
 
-const nx::ContentMetaBinary& CnmtProcess::getContentMetaBinary() const
+const nn::hac::ContentMetaBinary& CnmtProcess::getContentMetaBinary() const
 {
 	return mCnmt;
 }
diff --git a/programs/nstool/source/CnmtProcess.h b/programs/nstool/source/CnmtProcess.h
index 7fbd65a..1f4ca52 100644
--- a/programs/nstool/source/CnmtProcess.h
+++ b/programs/nstool/source/CnmtProcess.h
@@ -2,7 +2,7 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/IFile.h>
-#include <nx/ContentMetaBinary.h>
+#include <nn/hac/ContentMetaBinary.h>
 
 #include "nstool.h"
 
@@ -18,7 +18,7 @@ public:
 	void setCliOutputMode(CliOutputMode type);
 	void setVerifyMode(bool verify);
 
-	const nx::ContentMetaBinary& getContentMetaBinary() const;
+	const nn::hac::ContentMetaBinary& getContentMetaBinary() const;
 
 private:
 	const std::string kModuleName = "CnmtProcess";
@@ -28,7 +28,7 @@ private:
 	CliOutputMode mCliOutputMode;
 	bool mVerify;
 
-	nx::ContentMetaBinary mCnmt;
+	nn::hac::ContentMetaBinary mCnmt;
 
 	void displayCmnt();
 };
\ No newline at end of file
diff --git a/programs/nstool/source/ElfSymbolParser.cpp b/programs/nstool/source/ElfSymbolParser.cpp
index 9808a19..acac3d0 100644
--- a/programs/nstool/source/ElfSymbolParser.cpp
+++ b/programs/nstool/source/ElfSymbolParser.cpp
@@ -23,7 +23,7 @@ bool ElfSymbolParser::operator!=(const ElfSymbolParser& other) const
 void ElfSymbolParser::parseData(const byte_t *dyn_sym, size_t dyn_sym_size, const byte_t *dyn_str, size_t dyn_str_size, bool is64Bit)
 {
 	//printf("ElfSymbolParser::parseData()");
-	size_t dynSymSize = is64Bit ? sizeof(nx::sElfSymbol64Bit) : sizeof(nx::sElfSymbol32Bit);
+	size_t dynSymSize = is64Bit ? sizeof(nn::hac::sElfSymbol64Bit) : sizeof(nn::hac::sElfSymbol32Bit);
 
 	sElfSymbol symbol;
 	for (size_t i = 0; i < dyn_sym_size; i += dynSymSize)
@@ -34,17 +34,17 @@ void ElfSymbolParser::parseData(const byte_t *dyn_sym, size_t dyn_sym_size, cons
 
 		if (is64Bit)
 		{
-			name_pos = ((nx::sElfSymbol64Bit*)(dyn_sym + i))->name.get();
-			symbol.shn_index = (nx::elf::SpecialSectionIndex)((nx::sElfSymbol64Bit*)(dyn_sym + i))->special_section_index.get();
-			symbol.symbol_type = (nx::elf::SymbolType)((((nx::sElfSymbol64Bit*)(dyn_sym + i))->info) & nx::elf::STT_HIPROC);
-			symbol.symbol_binding = (nx::elf::SymbolBinding)(((((nx::sElfSymbol64Bit*)(dyn_sym + i))->info) >> 4) & nx::elf::STB_HIPROC);
+			name_pos = ((nn::hac::sElfSymbol64Bit*)(dyn_sym + i))->name.get();
+			symbol.shn_index = (nn::hac::elf::SpecialSectionIndex)((nn::hac::sElfSymbol64Bit*)(dyn_sym + i))->special_section_index.get();
+			symbol.symbol_type = (nn::hac::elf::SymbolType)((((nn::hac::sElfSymbol64Bit*)(dyn_sym + i))->info) & nn::hac::elf::STT_HIPROC);
+			symbol.symbol_binding = (nn::hac::elf::SymbolBinding)(((((nn::hac::sElfSymbol64Bit*)(dyn_sym + i))->info) >> 4) & nn::hac::elf::STB_HIPROC);
 		}
 		else
 		{
-			name_pos = ((nx::sElfSymbol64Bit*)(dyn_sym + i))->name.get();
-			symbol.shn_index = (nx::elf::SpecialSectionIndex)((nx::sElfSymbol32Bit*)(dyn_sym + i))->special_section_index.get();
-			symbol.symbol_type = (nx::elf::SymbolType)((((nx::sElfSymbol32Bit*)(dyn_sym + i))->info.get()) & nx::elf::STT_HIPROC);
-			symbol.symbol_binding = (nx::elf::SymbolBinding)(((((nx::sElfSymbol32Bit*)(dyn_sym + i))->info.get()) >> 4) & nx::elf::STB_HIPROC);
+			name_pos = ((nn::hac::sElfSymbol64Bit*)(dyn_sym + i))->name.get();
+			symbol.shn_index = (nn::hac::elf::SpecialSectionIndex)((nn::hac::sElfSymbol32Bit*)(dyn_sym + i))->special_section_index.get();
+			symbol.symbol_type = (nn::hac::elf::SymbolType)((((nn::hac::sElfSymbol32Bit*)(dyn_sym + i))->info.get()) & nn::hac::elf::STT_HIPROC);
+			symbol.symbol_binding = (nn::hac::elf::SymbolBinding)(((((nn::hac::sElfSymbol32Bit*)(dyn_sym + i))->info.get()) >> 4) & nn::hac::elf::STB_HIPROC);
 		}
 
 		for (; dyn_str[name_pos] == 0x00 && name_pos < dyn_str_size; name_pos++);
diff --git a/programs/nstool/source/ElfSymbolParser.h b/programs/nstool/source/ElfSymbolParser.h
index 751b535..a4e4b5c 100644
--- a/programs/nstool/source/ElfSymbolParser.h
+++ b/programs/nstool/source/ElfSymbolParser.h
@@ -1,16 +1,16 @@
 #pragma once
 #include <string>
 #include <fnd/List.h>
-#include <nx/elf.h>
+#include <nn/hac/elf.h>
 
 class ElfSymbolParser
 {
 public:
 	struct sElfSymbol
 	{
-		nx::elf::SpecialSectionIndex shn_index;
-		nx::elf::SymbolType symbol_type;
-		nx::elf::SymbolBinding symbol_binding;
+		nn::hac::elf::SpecialSectionIndex shn_index;
+		nn::hac::elf::SymbolType symbol_type;
+		nn::hac::elf::SymbolBinding symbol_binding;
 		std::string name;
 
 		void operator=(const sElfSymbol& other)
diff --git a/programs/nstool/source/EsTikProcess.cpp b/programs/nstool/source/EsTikProcess.cpp
index 22402a8..fb897de 100644
--- a/programs/nstool/source/EsTikProcess.cpp
+++ b/programs/nstool/source/EsTikProcess.cpp
@@ -2,7 +2,7 @@
 #include <iomanip>
 
 #include <fnd/SimpleTextOutput.h>
-#include <pki/SignUtils.h>
+#include <nn/pki/SignUtils.h>
 #include "OffsetAdjustedIFile.h"
 #include "EsTikProcess.h"
 #include "PkiValidator.h"
diff --git a/programs/nstool/source/EsTikProcess.h b/programs/nstool/source/EsTikProcess.h
index 2ada90c..2424156 100644
--- a/programs/nstool/source/EsTikProcess.h
+++ b/programs/nstool/source/EsTikProcess.h
@@ -3,9 +3,9 @@
 #include <fnd/types.h>
 #include <fnd/IFile.h>
 #include <fnd/Vec.h>
-#include <pki/SignedData.h>
-#include <pki/CertificateBody.h>
-#include <es/TicketBody_V2.h>
+#include <nn/pki/SignedData.h>
+#include <nn/pki/CertificateBody.h>
+#include <nn/es/TicketBody_V2.h>
 #include "nstool.h"
 
 class EsTikProcess
diff --git a/programs/nstool/source/HashTreeMeta.cpp b/programs/nstool/source/HashTreeMeta.cpp
index a8d4d41..4822164 100644
--- a/programs/nstool/source/HashTreeMeta.cpp
+++ b/programs/nstool/source/HashTreeMeta.cpp
@@ -40,13 +40,13 @@ void HashTreeMeta::importData(const byte_t* data, size_t len, HashTreeType type)
 {
 	if (type == HASH_TYPE_INTEGRITY)
 	{
-		nx::HierarchicalIntegrityHeader hdr;
+		nn::hac::HierarchicalIntegrityHeader hdr;
 		hdr.fromBytes(data, len);
 		importHierarchicalIntergityHeader(hdr);
 	}
 	else if (type == HASH_TYPE_SHA256)
 	{
-		nx::HierarchicalSha256Header hdr;
+		nn::hac::HierarchicalSha256Header hdr;
 		hdr.fromBytes(data, len);
 		importHierarchicalSha256Header(hdr);
 	}
@@ -92,7 +92,7 @@ void HashTreeMeta::setAlignHashToBlock(bool doAlign)
 	mDoAlignHashToBlock = doAlign;
 }
 
-void HashTreeMeta::importHierarchicalIntergityHeader(const nx::HierarchicalIntegrityHeader& hdr)
+void HashTreeMeta::importHierarchicalIntergityHeader(const nn::hac::HierarchicalIntegrityHeader& hdr)
 {
 	mDoAlignHashToBlock = true;
 	for (size_t i = 0; i < hdr.getLayerInfo().size(); i++)
@@ -113,7 +113,7 @@ void HashTreeMeta::importHierarchicalIntergityHeader(const nx::HierarchicalInteg
 	mMasterHashList = hdr.getMasterHashList();
 }
 
-void HashTreeMeta::importHierarchicalSha256Header(const nx::HierarchicalSha256Header& hdr)
+void HashTreeMeta::importHierarchicalSha256Header(const nn::hac::HierarchicalSha256Header& hdr)
 {
 	mDoAlignHashToBlock = false;
 	for (size_t i = 0; i < hdr.getLayerInfo().size(); i++)
diff --git a/programs/nstool/source/HashTreeMeta.h b/programs/nstool/source/HashTreeMeta.h
index f8225a2..ecdbdda 100644
--- a/programs/nstool/source/HashTreeMeta.h
+++ b/programs/nstool/source/HashTreeMeta.h
@@ -1,6 +1,6 @@
 #pragma once
-#include <nx/HierarchicalIntegrityHeader.h>
-#include <nx/HierarchicalSha256Header.h>
+#include <nn/hac/HierarchicalIntegrityHeader.h>
+#include <nn/hac/HierarchicalSha256Header.h>
 
 class HashTreeMeta
 {
@@ -63,6 +63,6 @@ private:
 	fnd::List<crypto::sha::sSha256Hash> mMasterHashList;
 	bool mDoAlignHashToBlock;
 
-	void importHierarchicalIntergityHeader(const nx::HierarchicalIntegrityHeader& hdr);
-	void importHierarchicalSha256Header(const nx::HierarchicalSha256Header& hdr);
+	void importHierarchicalIntergityHeader(const nn::hac::HierarchicalIntegrityHeader& hdr);
+	void importHierarchicalSha256Header(const nn::hac::HierarchicalSha256Header& hdr);
 };
\ No newline at end of file
diff --git a/programs/nstool/source/NacpProcess.cpp b/programs/nstool/source/NacpProcess.cpp
index dfbe51a..52cb2f8 100644
--- a/programs/nstool/source/NacpProcess.cpp
+++ b/programs/nstool/source/NacpProcess.cpp
@@ -3,54 +3,54 @@
 #include "OffsetAdjustedIFile.h"
 #include "NacpProcess.h"
 
-const char* getLanguageStr(nx::nacp::Language var)
+const char* getLanguageStr(nn::hac::nacp::Language var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::LANG_AmericanEnglish):
+	case (nn::hac::nacp::LANG_AmericanEnglish):
 		str = "AmericanEnglish";
 		break;
-	case (nx::nacp::LANG_BritishEnglish):
+	case (nn::hac::nacp::LANG_BritishEnglish):
 		str = "BritishEnglish";
 		break;
-	case (nx::nacp::LANG_Japanese):
+	case (nn::hac::nacp::LANG_Japanese):
 		str = "Japanese";
 		break;
-	case (nx::nacp::LANG_French):
+	case (nn::hac::nacp::LANG_French):
 		str = "French";
 		break;
-	case (nx::nacp::LANG_German):
+	case (nn::hac::nacp::LANG_German):
 		str = "German";
 		break;
-	case (nx::nacp::LANG_LatinAmericanSpanish):
+	case (nn::hac::nacp::LANG_LatinAmericanSpanish):
 		str = "LatinAmericanSpanish";
 		break;
-	case (nx::nacp::LANG_Spanish):
+	case (nn::hac::nacp::LANG_Spanish):
 		str = "Spanish";
 		break;
-	case (nx::nacp::LANG_Italian):
+	case (nn::hac::nacp::LANG_Italian):
 		str = "Italian";
 		break;
-	case (nx::nacp::LANG_Dutch):
+	case (nn::hac::nacp::LANG_Dutch):
 		str = "Dutch";
 		break;
-	case (nx::nacp::LANG_CanadianFrench):
+	case (nn::hac::nacp::LANG_CanadianFrench):
 		str = "CanadianFrench";
 		break;
-	case (nx::nacp::LANG_Portuguese):
+	case (nn::hac::nacp::LANG_Portuguese):
 		str = "Portuguese";
 		break;
-	case (nx::nacp::LANG_Russian):
+	case (nn::hac::nacp::LANG_Russian):
 		str = "Russian";
 		break;
-	case (nx::nacp::LANG_Korean):
+	case (nn::hac::nacp::LANG_Korean):
 		str = "Korean";
 		break;
-	case (nx::nacp::LANG_TraditionalChinese):
+	case (nn::hac::nacp::LANG_TraditionalChinese):
 		str = "TraditionalChinese";
 		break;
-	case (nx::nacp::LANG_SimplifiedChinese):
+	case (nn::hac::nacp::LANG_SimplifiedChinese):
 		str = "SimplifiedChinese";
 		break;
 	default:
@@ -59,18 +59,18 @@ const char* getLanguageStr(nx::nacp::Language var)
 	return str;
 }
 
-const char* getStartupUserAccountStr(nx::nacp::StartupUserAccount var)
+const char* getStartupUserAccountStr(nn::hac::nacp::StartupUserAccount var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::USER_None):
+	case (nn::hac::nacp::USER_None):
 		str = "None";
 		break;
-	case (nx::nacp::USER_Required):
+	case (nn::hac::nacp::USER_Required):
 		str = "Required";
 		break;
-	case (nx::nacp::USER_RequiredWithNetworkServiceAccountAvailable):
+	case (nn::hac::nacp::USER_RequiredWithNetworkServiceAccountAvailable):
 		str = "RequiredWithNetworkServiceAccountAvailable";
 		break;
 	default:
@@ -79,18 +79,18 @@ const char* getStartupUserAccountStr(nx::nacp::StartupUserAccount var)
 	return str;
 }
 
-const char* getTouchScreenUsageModeStr(nx::nacp::TouchScreenUsageMode var)
+const char* getTouchScreenUsageModeStr(nn::hac::nacp::TouchScreenUsageMode var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::TOUCH_None):
+	case (nn::hac::nacp::TOUCH_None):
 		str = "None";
 		break;
-	case (nx::nacp::TOUCH_Supported):
+	case (nn::hac::nacp::TOUCH_Supported):
 		str = "Supported";
 		break;
-	case (nx::nacp::TOUCH_Required):
+	case (nn::hac::nacp::TOUCH_Required):
 		str = "Required";
 		break;
 	default:
@@ -99,15 +99,15 @@ const char* getTouchScreenUsageModeStr(nx::nacp::TouchScreenUsageMode var)
 	return str;
 }
 
-const char* getAocRegistrationTypeStr(nx::nacp::AocRegistrationType var)
+const char* getAocRegistrationTypeStr(nn::hac::nacp::AocRegistrationType var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::AOC_AllOnLaunch):
+	case (nn::hac::nacp::AOC_AllOnLaunch):
 		str = "AllOnLaunch";
 		break;
-	case (nx::nacp::AOC_OnDemand):
+	case (nn::hac::nacp::AOC_OnDemand):
 		str = "OnDemand";
 		break;
 	default:
@@ -116,18 +116,18 @@ const char* getAocRegistrationTypeStr(nx::nacp::AocRegistrationType var)
 	return str;
 }
 
-const char* getAttributeFlagStr(nx::nacp::AttributeFlag var)
+const char* getAttributeFlagStr(nn::hac::nacp::AttributeFlag var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::ATTR_None):
+	case (nn::hac::nacp::ATTR_None):
 		str = "None";
 		break;
-	case (nx::nacp::ATTR_Demo):
+	case (nn::hac::nacp::ATTR_Demo):
 		str = "Demo";
 		break;
-	case (nx::nacp::ATTR_RetailInteractiveDisplay):
+	case (nn::hac::nacp::ATTR_RetailInteractiveDisplay):
 		str = "RetailInteractiveDisplay";
 		break;
 	default:
@@ -136,15 +136,15 @@ const char* getAttributeFlagStr(nx::nacp::AttributeFlag var)
 	return str;
 }
 
-const char* getParentalControlFlagStr(nx::nacp::ParentalControlFlag var)
+const char* getParentalControlFlagStr(nn::hac::nacp::ParentalControlFlag var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::PC_None):
+	case (nn::hac::nacp::PC_None):
 		str = "None";
 		break;
-	case (nx::nacp::PC_FreeCommunication):
+	case (nn::hac::nacp::PC_FreeCommunication):
 		str = "FreeCommunication";
 		break;
 	default:
@@ -153,15 +153,15 @@ const char* getParentalControlFlagStr(nx::nacp::ParentalControlFlag var)
 	return str;
 }
 
-const char* getScreenshotModeStr(nx::nacp::ScreenshotMode var)
+const char* getScreenshotModeStr(nn::hac::nacp::ScreenshotMode var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::SCRN_Allow):
+	case (nn::hac::nacp::SCRN_Allow):
 		str = "Allow";
 		break;
-	case (nx::nacp::SCRN_Deny):
+	case (nn::hac::nacp::SCRN_Deny):
 		str = "Deny";
 		break;
 	default:
@@ -170,18 +170,18 @@ const char* getScreenshotModeStr(nx::nacp::ScreenshotMode var)
 	return str;
 }
 
-const char* getVideoCaptureModeStr(nx::nacp::VideoCaptureMode var)
+const char* getVideoCaptureModeStr(nn::hac::nacp::VideoCaptureMode var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::VCAP_Disable):
+	case (nn::hac::nacp::VCAP_Disable):
 		str = "Disable";
 		break;
-	case (nx::nacp::VCAP_Manual):
+	case (nn::hac::nacp::VCAP_Manual):
 		str = "Manual";
 		break;
-	case (nx::nacp::VCAP_Enable):
+	case (nn::hac::nacp::VCAP_Enable):
 		str = "Enable";
 		break;
 	default:
@@ -190,15 +190,15 @@ const char* getVideoCaptureModeStr(nx::nacp::VideoCaptureMode var)
 	return str;
 }
 
-const char* getDataLossConfirmationStr(nx::nacp::DataLossConfirmation var)
+const char* getDataLossConfirmationStr(nn::hac::nacp::DataLossConfirmation var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::DLOSS_None):
+	case (nn::hac::nacp::DLOSS_None):
 		str = "None";
 		break;
-	case (nx::nacp::DLOSS_Required):
+	case (nn::hac::nacp::DLOSS_Required):
 		str = "Required";
 		break;
 	default:
@@ -207,18 +207,18 @@ const char* getDataLossConfirmationStr(nx::nacp::DataLossConfirmation var)
 	return str;
 }
 
-const char* getPlayLogPolicyStr(nx::nacp::PlayLogPolicy var)
+const char* getPlayLogPolicyStr(nn::hac::nacp::PlayLogPolicy var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::PLP_All):
+	case (nn::hac::nacp::PLP_All):
 		str = "All";
 		break;
-	case (nx::nacp::PLP_LogOnly):
+	case (nn::hac::nacp::PLP_LogOnly):
 		str = "LogOnly";
 		break;
-	case (nx::nacp::PLP_None):
+	case (nn::hac::nacp::PLP_None):
 		str = "None";
 		break;
 	default:
@@ -227,45 +227,45 @@ const char* getPlayLogPolicyStr(nx::nacp::PlayLogPolicy var)
 	return str;
 }
 
-const char* getOrganisationStr(nx::nacp::Organisation var)
+const char* getOrganisationStr(nn::hac::nacp::Organisation var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::ORGN_CERO):
+	case (nn::hac::nacp::ORGN_CERO):
 		str = "CERO";
 		break;
-	case (nx::nacp::ORGN_GRACGCRB):
+	case (nn::hac::nacp::ORGN_GRACGCRB):
 		str = "GRACGCRB";
 		break;
-	case (nx::nacp::ORGN_GSRMR):
+	case (nn::hac::nacp::ORGN_GSRMR):
 		str = "GSRMR";
 		break;
-	case (nx::nacp::ORGN_ESRB):
+	case (nn::hac::nacp::ORGN_ESRB):
 		str = "ESRB";
 		break;
-	case (nx::nacp::ORGN_ClassInd):
+	case (nn::hac::nacp::ORGN_ClassInd):
 		str = "ClassInd";
 		break;
-	case (nx::nacp::ORGN_USK):
+	case (nn::hac::nacp::ORGN_USK):
 		str = "USK";
 		break;
-	case (nx::nacp::ORGN_PEGI):
+	case (nn::hac::nacp::ORGN_PEGI):
 		str = "PEGI";
 		break;
-	case (nx::nacp::ORGN_PEGIPortugal):
+	case (nn::hac::nacp::ORGN_PEGIPortugal):
 		str = "PEGIPortugal";
 		break;
-	case (nx::nacp::ORGN_PEGIBBFC):
+	case (nn::hac::nacp::ORGN_PEGIBBFC):
 		str = "PEGIBBFC";
 		break;
-	case (nx::nacp::ORGN_Russian):
+	case (nn::hac::nacp::ORGN_Russian):
 		str = "Russian";
 		break;
-	case (nx::nacp::ORGN_ACB):
+	case (nn::hac::nacp::ORGN_ACB):
 		str = "ACB";
 		break;
-	case (nx::nacp::ORGN_OFLC):
+	case (nn::hac::nacp::ORGN_OFLC):
 		str = "OFLC";
 		break;
 	default:
@@ -274,18 +274,18 @@ const char* getOrganisationStr(nx::nacp::Organisation var)
 	return str;
 }
 
-const char* getLogoTypeStr(nx::nacp::LogoType var)
+const char* getLogoTypeStr(nn::hac::nacp::LogoType var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::LOGO_LicensedByNintendo):
+	case (nn::hac::nacp::LOGO_LicensedByNintendo):
 		str = "LicensedByNintendo";
 		break;
-	case (nx::nacp::LOGO_DistributedByNintendo):
+	case (nn::hac::nacp::LOGO_DistributedByNintendo):
 		str = "DistributedByNintendo";
 		break;
-	case (nx::nacp::LOGO_Nintendo):
+	case (nn::hac::nacp::LOGO_Nintendo):
 		str = "Nintendo";
 		break;
 	default:
@@ -294,15 +294,15 @@ const char* getLogoTypeStr(nx::nacp::LogoType var)
 	return str;
 }
 
-const char* getLogoHandlingStr(nx::nacp::LogoHandling var)
+const char* getLogoHandlingStr(nn::hac::nacp::LogoHandling var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::LHND_Auto):
+	case (nn::hac::nacp::LHND_Auto):
 		str = "Auto";
 		break;
-	case (nx::nacp::LHND_None):
+	case (nn::hac::nacp::LHND_None):
 		str = "None";
 		break;
 	default:
@@ -311,15 +311,15 @@ const char* getLogoHandlingStr(nx::nacp::LogoHandling var)
 	return str;
 }
 
-const char* getRuntimeAocInstallModeStr(nx::nacp::RuntimeAocInstallMode var)
+const char* getRuntimeAocInstallModeStr(nn::hac::nacp::RuntimeAocInstallMode var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::RTAOC_Deny):
+	case (nn::hac::nacp::RTAOC_Deny):
 		str = "Deny";
 		break;
-	case (nx::nacp::RTAOC_AllowAppend):
+	case (nn::hac::nacp::RTAOC_AllowAppend):
 		str = "AllowAppend";
 		break;
 	default:
@@ -328,15 +328,15 @@ const char* getRuntimeAocInstallModeStr(nx::nacp::RuntimeAocInstallMode var)
 	return str;
 }
 
-const char* getCrashReportModeStr(nx::nacp::CrashReportMode var)
+const char* getCrashReportModeStr(nn::hac::nacp::CrashReportMode var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::CREP_Deny):
+	case (nn::hac::nacp::CREP_Deny):
 		str = "Deny";
 		break;
-	case (nx::nacp::CREP_Allow):
+	case (nn::hac::nacp::CREP_Allow):
 		str = "Allow";
 		break;
 	default:
@@ -345,15 +345,15 @@ const char* getCrashReportModeStr(nx::nacp::CrashReportMode var)
 	return str;
 }
 
-const char* getHdcpStr(nx::nacp::Hdcp var)
+const char* getHdcpStr(nn::hac::nacp::Hdcp var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::HDCP_None):
+	case (nn::hac::nacp::HDCP_None):
 		str = "None";
 		break;
-	case (nx::nacp::HDCP_Required):
+	case (nn::hac::nacp::HDCP_Required):
 		str = "Required";
 		break;
 	default:
@@ -362,18 +362,18 @@ const char* getHdcpStr(nx::nacp::Hdcp var)
 	return str;
 }
 
-const char* getPlayLogQueryCapabilityStr(nx::nacp::PlayLogQueryCapability var)
+const char* getPlayLogQueryCapabilityStr(nn::hac::nacp::PlayLogQueryCapability var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::PLQC_None):
+	case (nn::hac::nacp::PLQC_None):
 		str = "None";
 		break;
-	case (nx::nacp::PLQC_Whitelist):
+	case (nn::hac::nacp::PLQC_Whitelist):
 		str = "Whitelist";
 		break;
-	case (nx::nacp::PLQC_All):
+	case (nn::hac::nacp::PLQC_All):
 		str = "All";
 		break;
 	default:
@@ -382,15 +382,15 @@ const char* getPlayLogQueryCapabilityStr(nx::nacp::PlayLogQueryCapability var)
 	return str;
 }
 
-const char* getRepairFlagStr(nx::nacp::RepairFlag var)
+const char* getRepairFlagStr(nn::hac::nacp::RepairFlag var)
 {
 	const char* str = nullptr;
 	switch(var)
 	{
-	case (nx::nacp::REPF_None):
+	case (nn::hac::nacp::REPF_None):
 		str = "None";
 		break;
-	case (nx::nacp::REPF_SuppressGameCardAccess):
+	case (nn::hac::nacp::REPF_SuppressGameCardAccess):
 		str = "SuppressGameCardAccess";
 		break;
 	default:
@@ -473,7 +473,7 @@ void NacpProcess::setVerifyMode(bool verify)
 	mVerify = verify;
 }
 
-const nx::ApplicationControlPropertyBinary& NacpProcess::getApplicationControlPropertyBinary() const
+const nn::hac::ApplicationControlPropertyBinary& NacpProcess::getApplicationControlPropertyBinary() const
 {
 	return mNacp;
 }
diff --git a/programs/nstool/source/NacpProcess.h b/programs/nstool/source/NacpProcess.h
index bd7dc82..7511d79 100644
--- a/programs/nstool/source/NacpProcess.h
+++ b/programs/nstool/source/NacpProcess.h
@@ -2,7 +2,7 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/IFile.h>
-#include <nx/ApplicationControlPropertyBinary.h>
+#include <nn/hac/ApplicationControlPropertyBinary.h>
 
 #include "nstool.h"
 
@@ -18,7 +18,7 @@ public:
 	void setCliOutputMode(CliOutputMode type);
 	void setVerifyMode(bool verify);
 
-	const nx::ApplicationControlPropertyBinary& getApplicationControlPropertyBinary() const;
+	const nn::hac::ApplicationControlPropertyBinary& getApplicationControlPropertyBinary() const;
 
 private:
 	const std::string kModuleName = "NacpProcess";
@@ -28,7 +28,7 @@ private:
 	CliOutputMode mCliOutputMode;
 	bool mVerify;
 
-	nx::ApplicationControlPropertyBinary mNacp;
+	nn::hac::ApplicationControlPropertyBinary mNacp;
 
 	void displayNacp();
 };
\ No newline at end of file
diff --git a/programs/nstool/source/NcaProcess.cpp b/programs/nstool/source/NcaProcess.cpp
index 5080f06..bf7838b 100644
--- a/programs/nstool/source/NcaProcess.cpp
+++ b/programs/nstool/source/NcaProcess.cpp
@@ -1,8 +1,8 @@
 #include <iostream>
 #include <sstream>
 #include <fnd/SimpleTextOutput.h>
-#include <nx/NcaUtils.h>
-#include <nx/AesKeygen.h>
+#include <nn/hac/NcaUtils.h>
+#include <nn/hac/AesKeygen.h>
 #include "NcaProcess.h"
 #include "PfsProcess.h"
 #include "RomfsProcess.h"
@@ -11,15 +11,15 @@
 #include "AesCtrWrappedIFile.h"
 #include "HashTreeWrappedIFile.h"
 
-const char* getFormatVersionStr(nx::NcaHeader::FormatVersion format_ver)
+const char* getFormatVersionStr(nn::hac::NcaHeader::FormatVersion format_ver)
 {
 	const char* str;
 	switch (format_ver)
 	{
-		case (nx::NcaHeader::NCA2_FORMAT):
+		case (nn::hac::NcaHeader::NCA2_FORMAT):
 			str = "NCA2";
 			break;
-		case (nx::NcaHeader::NCA3_FORMAT):
+		case (nn::hac::NcaHeader::NCA3_FORMAT):
 			str = "NCA3";
 			break;
 		default:
@@ -29,15 +29,15 @@ const char* getFormatVersionStr(nx::NcaHeader::FormatVersion format_ver)
 	return str;
 }
 
-const char* getDistributionTypeStr(nx::nca::DistributionType dist_type)
+const char* getDistributionTypeStr(nn::hac::nca::DistributionType dist_type)
 {
 	const char* str;
 	switch (dist_type)
 	{
-		case (nx::nca::DIST_DOWNLOAD):
+		case (nn::hac::nca::DIST_DOWNLOAD):
 			str = "Download";
 			break;
-		case (nx::nca::DIST_GAME_CARD):
+		case (nn::hac::nca::DIST_GAME_CARD):
 			str = "Game Card";
 			break;
 		default:
@@ -48,27 +48,27 @@ const char* getDistributionTypeStr(nx::nca::DistributionType dist_type)
 }
 
 
- const char* getContentTypeStr(nx::nca::ContentType cont_type)
+ const char* getContentTypeStr(nn::hac::nca::ContentType cont_type)
 {
 	const char* str;
 	switch (cont_type)
 	{
-		case (nx::nca::TYPE_PROGRAM):
+		case (nn::hac::nca::TYPE_PROGRAM):
 			str = "Program";
 			break;
-		case (nx::nca::TYPE_META):
+		case (nn::hac::nca::TYPE_META):
 			str = "Meta";
 			break;
-		case (nx::nca::TYPE_CONTROL):
+		case (nn::hac::nca::TYPE_CONTROL):
 			str = "Control";
 			break;
-		case (nx::nca::TYPE_MANUAL):
+		case (nn::hac::nca::TYPE_MANUAL):
 			str = "Manual";
 			break;
-		case (nx::nca::TYPE_DATA):
+		case (nn::hac::nca::TYPE_DATA):
 			str = "Data";
 			break;
-		case (nx::nca::TYPE_PUBLIC_DATA):
+		case (nn::hac::nca::TYPE_PUBLIC_DATA):
 			str = "PublicData";
 			break;
 		default:
@@ -78,24 +78,24 @@ const char* getDistributionTypeStr(nx::nca::DistributionType dist_type)
 	return str;
 }
 
-const char* getEncryptionTypeStr(nx::nca::EncryptionType enc_type)
+const char* getEncryptionTypeStr(nn::hac::nca::EncryptionType enc_type)
 {
 	const char* str;
 	switch (enc_type)
 	{
-		case (nx::nca::CRYPT_AUTO):
+		case (nn::hac::nca::CRYPT_AUTO):
 			str = "Auto";
 			break;
-		case (nx::nca::CRYPT_NONE):
+		case (nn::hac::nca::CRYPT_NONE):
 			str = "None";
 			break;
-		case (nx::nca::CRYPT_AESXTS):
+		case (nn::hac::nca::CRYPT_AESXTS):
 			str = "AesXts";
 			break;
-		case (nx::nca::CRYPT_AESCTR):
+		case (nn::hac::nca::CRYPT_AESCTR):
 			str = "AesCtr";
 			break;
-		case (nx::nca::CRYPT_AESCTREX):
+		case (nn::hac::nca::CRYPT_AESCTREX):
 			str = "AesCtrEx";
 			break;
 		default:
@@ -105,21 +105,21 @@ const char* getEncryptionTypeStr(nx::nca::EncryptionType enc_type)
 	return str;
 }
 
-inline const char* getHashTypeStr(nx::nca::HashType hash_type)
+inline const char* getHashTypeStr(nn::hac::nca::HashType hash_type)
 {
 	const char* str;
 	switch (hash_type)
 	{
-		case (nx::nca::HASH_AUTO):
+		case (nn::hac::nca::HASH_AUTO):
 			str = "Auto";
 			break;
-		case (nx::nca::HASH_NONE):
+		case (nn::hac::nca::HASH_NONE):
 			str = "None";
 			break;
-		case (nx::nca::HASH_HIERARCHICAL_SHA256):
+		case (nn::hac::nca::HASH_HIERARCHICAL_SHA256):
 			str = "HierarchicalSha256";
 			break;
-		case (nx::nca::HASH_HIERARCHICAL_INTERGRITY):
+		case (nn::hac::nca::HASH_HIERARCHICAL_INTERGRITY):
 			str = "HierarchicalIntegrity";
 			break;
 		default:
@@ -129,15 +129,15 @@ inline const char* getHashTypeStr(nx::nca::HashType hash_type)
 	return str;
 }
 
-inline const char* getFormatTypeStr(nx::nca::FormatType format_type)
+inline const char* getFormatTypeStr(nn::hac::nca::FormatType format_type)
 {
 	const char* str;
 	switch (format_type)
 	{
-		case (nx::nca::FORMAT_ROMFS):
+		case (nn::hac::nca::FORMAT_ROMFS):
 			str = "RomFs";
 			break;
-		case (nx::nca::FORMAT_PFS0):
+		case (nn::hac::nca::FORMAT_PFS0):
 			str = "PartitionFs";
 			break;
 		default:
@@ -147,18 +147,18 @@ inline const char* getFormatTypeStr(nx::nca::FormatType format_type)
 	return str;
 }
 
-inline const char* getKaekIndexStr(nx::nca::KeyAreaEncryptionKeyIndex keak_index)
+inline const char* getKaekIndexStr(nn::hac::nca::KeyAreaEncryptionKeyIndex keak_index)
 {
 	const char* str;
 	switch (keak_index)
 	{
-		case (nx::nca::KAEK_IDX_APPLICATION):
+		case (nn::hac::nca::KAEK_IDX_APPLICATION):
 			str = "Application";
 			break;
-		case (nx::nca::KAEK_IDX_OCEAN):
+		case (nn::hac::nca::KAEK_IDX_OCEAN):
 			str = "Ocean";
 			break;
-		case (nx::nca::KAEK_IDX_SYSTEM):
+		case (nn::hac::nca::KAEK_IDX_SYSTEM):
 			str = "System";
 			break;
 		default:
@@ -168,27 +168,27 @@ inline const char* getKaekIndexStr(nx::nca::KeyAreaEncryptionKeyIndex keak_index
 	return str;
 }
 
-inline const char* getContentTypeForMountStr(nx::nca::ContentType cont_type)
+inline const char* getContentTypeForMountStr(nn::hac::nca::ContentType cont_type)
 {
 	const char* str;
 	switch (cont_type)
 	{
-		case (nx::nca::TYPE_PROGRAM):
+		case (nn::hac::nca::TYPE_PROGRAM):
 			str = "program";
 			break;
-		case (nx::nca::TYPE_META):
+		case (nn::hac::nca::TYPE_META):
 			str = "meta";
 			break;
-		case (nx::nca::TYPE_CONTROL):
+		case (nn::hac::nca::TYPE_CONTROL):
 			str = "control";
 			break;
-		case (nx::nca::TYPE_MANUAL):
+		case (nn::hac::nca::TYPE_MANUAL):
 			str = "manual";
 			break;
-		case (nx::nca::TYPE_DATA):
+		case (nn::hac::nca::TYPE_DATA):
 			str = "data";
 			break;
-		case (nx::nca::TYPE_PUBLIC_DATA):
+		case (nn::hac::nca::TYPE_PUBLIC_DATA):
 			str = "publicData";
 			break;
 		default:
@@ -203,13 +203,13 @@ const char* getProgramPartitionNameStr(size_t i)
 	const char* str;
 	switch (i)
 	{
-		case (nx::nca::PARTITION_CODE):
+		case (nn::hac::nca::PARTITION_CODE):
 			str = "code";
 			break;
-		case (nx::nca::PARTITION_DATA):
+		case (nn::hac::nca::PARTITION_DATA):
 			str = "data";
 			break;
-		case (nx::nca::PARTITION_LOGO):
+		case (nn::hac::nca::PARTITION_LOGO):
 			str = "logo";
 			break;
 		default:
@@ -228,7 +228,7 @@ NcaProcess::NcaProcess() :
 	mVerify(false),
 	mListFs(false)
 {
-	for (size_t i = 0; i < nx::nca::kPartitionNum; i++)
+	for (size_t i = 0; i < nn::hac::nca::kPartitionNum; i++)
 	{
 		mPartitionPath[i].doExtract = false;
 		mPartitions[i].reader = nullptr;
@@ -242,7 +242,7 @@ NcaProcess::~NcaProcess()
 		delete mFile;
 	}
 
-	for (size_t i = 0; i < nx::nca::kPartitionNum; i++)
+	for (size_t i = 0; i < nn::hac::nca::kPartitionNum; i++)
 	{
 		if (mPartitions[i].reader != nullptr)
 		{
@@ -259,16 +259,16 @@ void NcaProcess::process()
 	}
 	
 	// read header block
-	mFile->read((byte_t*)&mHdrBlock, 0, sizeof(nx::sNcaHeaderBlock));
+	mFile->read((byte_t*)&mHdrBlock, 0, sizeof(nn::hac::sNcaHeaderBlock));
 	
 	// decrypt header block
-	nx::NcaUtils::decryptNcaHeader((byte_t*)&mHdrBlock, (byte_t*)&mHdrBlock, mKeyset->nca.header_key);
+	nn::hac::NcaUtils::decryptNcaHeader((byte_t*)&mHdrBlock, (byte_t*)&mHdrBlock, mKeyset->nca.header_key);
 
 	// generate header hash
-	crypto::sha::Sha256((byte_t*)&mHdrBlock.header, sizeof(nx::sNcaHeader), mHdrHash.bytes);
+	crypto::sha::Sha256((byte_t*)&mHdrBlock.header, sizeof(nn::hac::sNcaHeader), mHdrHash.bytes);
 
 	// proccess main header
-	mHdr.fromBytes((byte_t*)&mHdrBlock.header, sizeof(nx::sNcaHeader));
+	mHdr.fromBytes((byte_t*)&mHdrBlock.header, sizeof(nn::hac::sNcaHeader));
 
 	// determine keys
 	generateNcaBodyEncryptionKeys();
@@ -347,12 +347,12 @@ void NcaProcess::generateNcaBodyEncryptionKeys()
 	memset(zero_aesxts_key.key, 0, sizeof(zero_aesxts_key));
 	
 	// get key data from header
-	byte_t masterkey_rev = nx::NcaUtils::getMasterKeyRevisionFromKeyGeneration(mHdr.getKeyGeneration());
+	byte_t masterkey_rev = nn::hac::NcaUtils::getMasterKeyRevisionFromKeyGeneration(mHdr.getKeyGeneration());
 	byte_t keak_index = mHdr.getKaekIndex();
 
 	// process key area
 	sKeys::sKeyAreaKey keak;
-	for (size_t i = 0; i < nx::nca::kAesKeyNum; i++)
+	for (size_t i = 0; i < nn::hac::nca::kAesKeyNum; i++)
 	{
 		if (mHdr.getEncAesKeys()[i] != zero_aesctr_key)
 		{
@@ -361,7 +361,7 @@ void NcaProcess::generateNcaBodyEncryptionKeys()
 			if (i < 4 && mKeyset->nca.key_area_key[keak_index][masterkey_rev] != zero_aesctr_key)
 			{
 				keak.decrypted = true;
-				nx::AesKeygen::generateKey(keak.dec.key, keak.enc.key, mKeyset->nca.key_area_key[keak_index][masterkey_rev].key);
+				nn::hac::AesKeygen::generateKey(keak.dec.key, keak.enc.key, mKeyset->nca.key_area_key[keak_index][masterkey_rev].key);
 			}
 			else
 			{
@@ -384,13 +384,13 @@ void NcaProcess::generateNcaBodyEncryptionKeys()
 			// the title key is provided (sourced from ticket)
 			if (mKeyset->nca.manual_title_key_aesctr != zero_aesctr_key)
 			{
-				nx::AesKeygen::generateKey(mBodyKeys.aes_ctr.var.key, mKeyset->nca.manual_title_key_aesctr.key, mKeyset->ticket.titlekey_kek[masterkey_rev].key);
+				nn::hac::AesKeygen::generateKey(mBodyKeys.aes_ctr.var.key, mKeyset->nca.manual_title_key_aesctr.key, mKeyset->ticket.titlekey_kek[masterkey_rev].key);
 				mBodyKeys.aes_ctr.isSet = true;
 			}
 			if (mKeyset->nca.manual_title_key_aesxts != zero_aesxts_key)
 			{
-				nx::AesKeygen::generateKey(mBodyKeys.aes_xts.var.key[0], mKeyset->nca.manual_title_key_aesxts.key[0], mKeyset->ticket.titlekey_kek[masterkey_rev].key);
-				nx::AesKeygen::generateKey(mBodyKeys.aes_xts.var.key[1], mKeyset->nca.manual_title_key_aesxts.key[1], mKeyset->ticket.titlekey_kek[masterkey_rev].key);
+				nn::hac::AesKeygen::generateKey(mBodyKeys.aes_xts.var.key[0], mKeyset->nca.manual_title_key_aesxts.key[0], mKeyset->ticket.titlekey_kek[masterkey_rev].key);
+				nn::hac::AesKeygen::generateKey(mBodyKeys.aes_xts.var.key[1], mKeyset->nca.manual_title_key_aesxts.key[1], mKeyset->ticket.titlekey_kek[masterkey_rev].key);
 				mBodyKeys.aes_xts.isSet = true;
 			}
 		}
@@ -402,15 +402,15 @@ void NcaProcess::generateNcaBodyEncryptionKeys()
 		crypto::aes::sAesXts128Key keak_aesxts_key = zero_aesxts_key;
 		for (size_t i = 0; i < mBodyKeys.keak_list.size(); i++)
 		{
-			if (mBodyKeys.keak_list[i].index == nx::nca::KEY_AESCTR && mBodyKeys.keak_list[i].decrypted)
+			if (mBodyKeys.keak_list[i].index == nn::hac::nca::KEY_AESCTR && mBodyKeys.keak_list[i].decrypted)
 			{
 				keak_aesctr_key = mBodyKeys.keak_list[i].dec;
 			}
-			else if (mBodyKeys.keak_list[i].index == nx::nca::KEY_AESXTS_0 && mBodyKeys.keak_list[i].decrypted)
+			else if (mBodyKeys.keak_list[i].index == nn::hac::nca::KEY_AESXTS_0 && mBodyKeys.keak_list[i].decrypted)
 			{
 				memcpy(keak_aesxts_key.key[0], mBodyKeys.keak_list[i].dec.key, sizeof(crypto::aes::sAes128Key));
 			}
-			else if (mBodyKeys.keak_list[i].index == nx::nca::KEY_AESXTS_1 && mBodyKeys.keak_list[i].decrypted)
+			else if (mBodyKeys.keak_list[i].index == nn::hac::nca::KEY_AESXTS_1 && mBodyKeys.keak_list[i].decrypted)
 			{
 				memcpy(keak_aesxts_key.key[1], mBodyKeys.keak_list[i].dec.key, sizeof(crypto::aes::sAes128Key));
 			}
@@ -465,15 +465,15 @@ void NcaProcess::generatePartitionConfiguration()
 	for (size_t i = 0; i < mHdr.getPartitions().size(); i++)
 	{
 		// get reference to relevant structures
-		const nx::NcaHeader::sPartition& partition = mHdr.getPartitions()[i];
-		nx::sNcaFsHeader& fs_header = mHdrBlock.fs_header[partition.index];
+		const nn::hac::NcaHeader::sPartition& partition = mHdr.getPartitions()[i];
+		nn::hac::sNcaFsHeader& fs_header = mHdrBlock.fs_header[partition.index];
 
 		// output structure
 		sPartitionInfo& info = mPartitions[partition.index];
 
 		// validate header hash
 		crypto::sha::sSha256Hash calc_hash;
-		crypto::sha::Sha256((const byte_t*)&mHdrBlock.fs_header[partition.index], sizeof(nx::sNcaFsHeader), calc_hash.bytes);
+		crypto::sha::Sha256((const byte_t*)&mHdrBlock.fs_header[partition.index], sizeof(nn::hac::sNcaFsHeader), calc_hash.bytes);
 		if (calc_hash.compare(partition.hash) == false)
 		{
 			error.clear();
@@ -482,7 +482,7 @@ void NcaProcess::generatePartitionConfiguration()
 		}
 			
 
-		if (fs_header.version.get() != nx::nca::kDefaultFsHeaderVersion)
+		if (fs_header.version.get() != nn::hac::nca::kDefaultFsHeaderVersion)
 		{
 			error.clear();
 			error <<  "NCA FS Header [" << partition.index << "] Version(" << fs_header.version.get() << "): UNSUPPORTED";
@@ -490,19 +490,19 @@ void NcaProcess::generatePartitionConfiguration()
 		}
 
 		// setup AES-CTR 
-		nx::NcaUtils::getNcaPartitionAesCtr(&fs_header, info.aes_ctr.iv);
+		nn::hac::NcaUtils::getNcaPartitionAesCtr(&fs_header, info.aes_ctr.iv);
 
 		// save partition config
 		info.reader = nullptr;
 		info.offset = partition.offset;
 		info.size = partition.size;
-		info.format_type = (nx::nca::FormatType)fs_header.format_type;
-		info.hash_type = (nx::nca::HashType)fs_header.hash_type;
-		info.enc_type = (nx::nca::EncryptionType)fs_header.encryption_type;
-		if (info.hash_type == nx::nca::HASH_HIERARCHICAL_SHA256)
-			info.hash_tree_meta.importData(fs_header.hash_superblock, nx::nca::kFsHeaderHashSuperblockLen, HashTreeMeta::HASH_TYPE_SHA256);
-		else if (info.hash_type == nx::nca::HASH_HIERARCHICAL_INTERGRITY)
-			info.hash_tree_meta.importData(fs_header.hash_superblock, nx::nca::kFsHeaderHashSuperblockLen, HashTreeMeta::HASH_TYPE_INTEGRITY);
+		info.format_type = (nn::hac::nca::FormatType)fs_header.format_type;
+		info.hash_type = (nn::hac::nca::HashType)fs_header.hash_type;
+		info.enc_type = (nn::hac::nca::EncryptionType)fs_header.encryption_type;
+		if (info.hash_type == nn::hac::nca::HASH_HIERARCHICAL_SHA256)
+			info.hash_tree_meta.importData(fs_header.hash_superblock, nn::hac::nca::kFsHeaderHashSuperblockLen, HashTreeMeta::HASH_TYPE_SHA256);
+		else if (info.hash_type == nn::hac::nca::HASH_HIERARCHICAL_INTERGRITY)
+			info.hash_tree_meta.importData(fs_header.hash_superblock, nn::hac::nca::kFsHeaderHashSuperblockLen, HashTreeMeta::HASH_TYPE_INTEGRITY);
 
 		// create reader
 		try 
@@ -510,8 +510,8 @@ void NcaProcess::generatePartitionConfiguration()
 			// filter out unrecognised format types
 			switch (info.format_type)
 			{
-				case (nx::nca::FORMAT_PFS0):
-				case (nx::nca::FORMAT_ROMFS):
+				case (nn::hac::nca::FORMAT_PFS0):
+				case (nn::hac::nca::FORMAT_ROMFS):
 					break;
 				default:
 					error.clear();
@@ -520,17 +520,17 @@ void NcaProcess::generatePartitionConfiguration()
 			}
 
 			// create reader based on encryption type0
-			if (info.enc_type == nx::nca::CRYPT_NONE)
+			if (info.enc_type == nn::hac::nca::CRYPT_NONE)
 			{
 				info.reader = new OffsetAdjustedIFile(mFile, SHARED_IFILE, info.offset, info.size);
 			}
-			else if (info.enc_type == nx::nca::CRYPT_AESCTR)
+			else if (info.enc_type == nn::hac::nca::CRYPT_AESCTR)
 			{
 				if (mBodyKeys.aes_ctr.isSet == false)
 					throw fnd::Exception(kModuleName, "AES-CTR Key was not determined");
 				info.reader = new OffsetAdjustedIFile(new AesCtrWrappedIFile(mFile, SHARED_IFILE, mBodyKeys.aes_ctr.var, info.aes_ctr), OWN_IFILE, info.offset, info.size);
 			}
-			else if (info.enc_type == nx::nca::CRYPT_AESXTS || info.enc_type == nx::nca::CRYPT_AESCTREX)
+			else if (info.enc_type == nn::hac::nca::CRYPT_AESXTS || info.enc_type == nn::hac::nca::CRYPT_AESCTREX)
 			{
 				error.clear();
 				error <<  "EncryptionType(" << getEncryptionTypeStr(info.enc_type) << "): UNSUPPORTED";
@@ -544,13 +544,13 @@ void NcaProcess::generatePartitionConfiguration()
 			}
 
 			// filter out unrecognised hash types, and hash based readers
-			if (info.hash_type == nx::nca::HASH_HIERARCHICAL_SHA256 || info.hash_type == nx::nca::HASH_HIERARCHICAL_INTERGRITY)
+			if (info.hash_type == nn::hac::nca::HASH_HIERARCHICAL_SHA256 || info.hash_type == nn::hac::nca::HASH_HIERARCHICAL_INTERGRITY)
 			{	
 				fnd::IFile* tmp = info.reader;
 				info.reader = nullptr;
 				info.reader = new HashTreeWrappedIFile(tmp, OWN_IFILE, info.hash_tree_meta);
 			}
-			else if (info.hash_type != nx::nca::HASH_NONE)
+			else if (info.hash_type != nn::hac::nca::HASH_NONE)
 			{
 				error.clear();
 				error <<  "HashType(" << info.hash_type << "): UNKNOWN";
@@ -576,24 +576,24 @@ void NcaProcess::validateNcaSignatures()
 	}
 
 	// validate signature[1]
-	if (mHdr.getContentType() == nx::nca::TYPE_PROGRAM)
+	if (mHdr.getContentType() == nn::hac::nca::TYPE_PROGRAM)
 	{
-		if (mPartitions[nx::nca::PARTITION_CODE].format_type == nx::nca::FORMAT_PFS0)
+		if (mPartitions[nn::hac::nca::PARTITION_CODE].format_type == nn::hac::nca::FORMAT_PFS0)
 		{
-			if (mPartitions[nx::nca::PARTITION_CODE].reader != nullptr)
+			if (mPartitions[nn::hac::nca::PARTITION_CODE].reader != nullptr)
 			{
 				PfsProcess exefs;
-				exefs.setInputFile(mPartitions[nx::nca::PARTITION_CODE].reader, SHARED_IFILE);
+				exefs.setInputFile(mPartitions[nn::hac::nca::PARTITION_CODE].reader, SHARED_IFILE);
 				exefs.setCliOutputMode(0);
 				exefs.process();
 
 				// open main.npdm
 				if (exefs.getPfsHeader().getFileList().hasElement(kNpdmExefsPath) == true)
 				{
-					const nx::PfsHeader::sFile& file = exefs.getPfsHeader().getFileList().getElement(kNpdmExefsPath);
+					const nn::hac::PfsHeader::sFile& file = exefs.getPfsHeader().getFileList().getElement(kNpdmExefsPath);
 
 					NpdmProcess npdm;
-					npdm.setInputFile(new OffsetAdjustedIFile(mPartitions[nx::nca::PARTITION_CODE].reader, SHARED_IFILE, file.offset, file.size), OWN_IFILE);
+					npdm.setInputFile(new OffsetAdjustedIFile(mPartitions[nn::hac::nca::PARTITION_CODE].reader, SHARED_IFILE, file.offset, file.size), OWN_IFILE);
 					npdm.setCliOutputMode(0);
 					npdm.process();
 
@@ -630,7 +630,7 @@ void NcaProcess::displayHeader()
 	printf("  Dist. Type:      %s\n", getDistributionTypeStr(mHdr.getDistributionType()));
 	printf("  Content Type:    %s\n", getContentTypeStr(mHdr.getContentType()));
 	printf("  Key Generation:  %d\n", mHdr.getKeyGeneration());
-	printf("  Kaek Index:      %s (%d)\n", getKaekIndexStr((nx::nca::KeyAreaEncryptionKeyIndex)mHdr.getKaekIndex()), mHdr.getKaekIndex());
+	printf("  Kaek Index:      %s (%d)\n", getKaekIndexStr((nn::hac::nca::KeyAreaEncryptionKeyIndex)mHdr.getKaekIndex()), mHdr.getKaekIndex());
 	printf("  Size:            0x%" PRIx64 "\n", mHdr.getContentSize());
 	printf("  ProgID:          0x%016" PRIx64 "\n", mHdr.getProgramId());
 	printf("  Content Index:   %" PRIu32 "\n", mHdr.getContentIndex());
@@ -640,7 +640,7 @@ void NcaProcess::displayHeader()
 	if (mHdr.hasRightsId())
 	{
 		printf("  RightsId:        ");
-		fnd::SimpleTextOutput::hexDump(mHdr.getRightsId(), nx::nca::kRightsIdLen);
+		fnd::SimpleTextOutput::hexDump(mHdr.getRightsId(), nn::hac::nca::kRightsIdLen);
 	}
 	
 
@@ -683,14 +683,14 @@ void NcaProcess::displayHeader()
 			printf("      Format Type: %s\n", getFormatTypeStr(info.format_type));
 			printf("      Hash Type:   %s\n", getHashTypeStr(info.hash_type));
 			printf("      Enc. Type:   %s\n", getEncryptionTypeStr(info.enc_type));
-			if (info.enc_type == nx::nca::CRYPT_AESCTR)
+			if (info.enc_type == nn::hac::nca::CRYPT_AESCTR)
 			{
 				printf("        AES-CTR:     ");
 				crypto::aes::sAesIvCtr ctr;
 				crypto::aes::AesIncrementCounter(info.aes_ctr.iv, info.offset>>4, ctr.iv);
 				fnd::SimpleTextOutput::hexDump(ctr.iv, sizeof(crypto::aes::sAesIvCtr));
 			}
-			if (info.hash_type == nx::nca::HASH_HIERARCHICAL_INTERGRITY)
+			if (info.hash_type == nn::hac::nca::HASH_HIERARCHICAL_INTERGRITY)
 			{
 				HashTreeMeta& hash_hdr = info.hash_tree_meta;
 				printf("      HierarchicalIntegrity Header:\n");
@@ -715,7 +715,7 @@ void NcaProcess::displayHeader()
 					fnd::SimpleTextOutput::hexDump(hash_hdr.getMasterHashList()[j].bytes, sizeof(crypto::sha::sSha256Hash));
 				}
 			}
-			else if (info.hash_type == nx::nca::HASH_HIERARCHICAL_SHA256)
+			else if (info.hash_type == nn::hac::nca::HASH_HIERARCHICAL_SHA256)
 			{
 				HashTreeMeta& hash_hdr = info.hash_tree_meta;
 				printf("      HierarchicalSha256 Header:\n");
@@ -733,7 +733,7 @@ void NcaProcess::displayHeader()
 			//else
 			//{
 			//	printf("      Hash Superblock:\n");
-			//	fnd::SimpleTextOutput::hxdStyleDump(fs_header.hash_superblock, nx::nca::kFsHeaderHashSuperblockLen);
+			//	fnd::SimpleTextOutput::hxdStyleDump(fs_header.hash_superblock, nn::hac::nca::kFsHeaderHashSuperblockLen);
 			//}
 		}
 	}
@@ -762,13 +762,13 @@ void NcaProcess::processPartitions()
 			continue;
 		}
 
-		if (partition.format_type == nx::nca::FORMAT_PFS0)
+		if (partition.format_type == nn::hac::nca::FORMAT_PFS0)
 		{
 			PfsProcess pfs;
 			pfs.setInputFile(partition.reader, SHARED_IFILE);
 			pfs.setCliOutputMode(mCliOutputMode);
 			pfs.setListFs(mListFs);
-			if (mHdr.getContentType() == nx::nca::TYPE_PROGRAM)
+			if (mHdr.getContentType() == nn::hac::nca::TYPE_PROGRAM)
 			{
 				pfs.setMountPointName(std::string(getContentTypeForMountStr(mHdr.getContentType())) + ":/" + std::string(getProgramPartitionNameStr(index)));
 			}
@@ -783,13 +783,13 @@ void NcaProcess::processPartitions()
 			pfs.process();
 			//printf("pfs.process() end\n");
 		}
-		else if (partition.format_type == nx::nca::FORMAT_ROMFS)
+		else if (partition.format_type == nn::hac::nca::FORMAT_ROMFS)
 		{
 			RomfsProcess romfs;
 			romfs.setInputFile(partition.reader, SHARED_IFILE);
 			romfs.setCliOutputMode(mCliOutputMode);
 			romfs.setListFs(mListFs);
-			if (mHdr.getContentType() == nx::nca::TYPE_PROGRAM)
+			if (mHdr.getContentType() == nn::hac::nca::TYPE_PROGRAM)
 			{
 				romfs.setMountPointName(std::string(getContentTypeForMountStr(mHdr.getContentType())) + ":/" + std::string(getProgramPartitionNameStr(index)));
 			}
diff --git a/programs/nstool/source/NcaProcess.h b/programs/nstool/source/NcaProcess.h
index dd5033c..d79ab5a 100644
--- a/programs/nstool/source/NcaProcess.h
+++ b/programs/nstool/source/NcaProcess.h
@@ -2,7 +2,7 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/SimpleFile.h>
-#include <nx/NcaHeader.h>
+#include <nn/hac/NcaHeader.h>
 #include "HashTreeMeta.h"
 
 
@@ -44,14 +44,14 @@ private:
 	{
 		std::string path;
 		bool doExtract;
-	} mPartitionPath[nx::nca::kPartitionNum];
+	} mPartitionPath[nn::hac::nca::kPartitionNum];
 
 	bool mListFs;
 
 	// data
-	nx::sNcaHeaderBlock mHdrBlock;
+	nn::hac::sNcaHeaderBlock mHdrBlock;
 	crypto::sha::sSha256Hash mHdrHash;
-	nx::NcaHeader mHdr;
+	nn::hac::NcaHeader mHdr;
 
 	// crypto
 	struct sKeys
@@ -98,12 +98,12 @@ private:
 		size_t size;
 
 		// meta data
-		nx::nca::FormatType format_type;
-		nx::nca::HashType hash_type;
-		nx::nca::EncryptionType enc_type;
+		nn::hac::nca::FormatType format_type;
+		nn::hac::nca::HashType hash_type;
+		nn::hac::nca::EncryptionType enc_type;
 		HashTreeMeta hash_tree_meta;
 		crypto::aes::sAesIvCtr aes_ctr;
-	} mPartitions[nx::nca::kPartitionNum];
+	} mPartitions[nn::hac::nca::kPartitionNum];
 
 	void generateNcaBodyEncryptionKeys();
 	void generatePartitionConfiguration();
diff --git a/programs/nstool/source/NpdmProcess.cpp b/programs/nstool/source/NpdmProcess.cpp
index 4c51bed..6a7f977 100644
--- a/programs/nstool/source/NpdmProcess.cpp
+++ b/programs/nstool/source/NpdmProcess.cpp
@@ -80,7 +80,7 @@ void NpdmProcess::setVerifyMode(bool verify)
 	mVerify = verify;
 }
 
-const nx::NpdmBinary& NpdmProcess::getNpdmBinary() const
+const nn::hac::NpdmBinary& NpdmProcess::getNpdmBinary() const
 {
 	return mNpdm;
 }
@@ -336,7 +336,7 @@ const std::string kMemMapType[2] = { "Io", "Static" };
  
 const std::string kAcidTarget[2] = { "Development", "Production" };
 
-void NpdmProcess::validateAcidSignature(const nx::AccessControlInfoDescBinary& acid)
+void NpdmProcess::validateAcidSignature(const nn::hac::AccessControlInfoDescBinary& acid)
 {
 	try {
 		acid.validateSignature(mKeyset->acid_sign_key);
@@ -347,7 +347,7 @@ void NpdmProcess::validateAcidSignature(const nx::AccessControlInfoDescBinary& a
 	
 }
 
-void NpdmProcess::validateAciFromAcid(const nx::AccessControlInfoBinary& aci, const nx::AccessControlInfoDescBinary& acid)
+void NpdmProcess::validateAciFromAcid(const nn::hac::AccessControlInfoBinary& aci, const nn::hac::AccessControlInfoDescBinary& acid)
 {
 	// check Program ID
 	if (acid.getProgramIdRestrict().min > 0 && aci.getProgramId() < acid.getProgramIdRestrict().min)
@@ -468,7 +468,7 @@ void NpdmProcess::validateAciFromAcid(const nx::AccessControlInfoBinary& aci, co
 
 		if (rightFound == false)
 		{
-			const nx::MemoryMappingHandler::sMemoryMapping& map = aci.getKernelCapabilities().getMemoryMaps().getMemoryMaps()[i];
+			const nn::hac::MemoryMappingHandler::sMemoryMapping& map = aci.getKernelCapabilities().getMemoryMaps().getMemoryMaps()[i];
 
 			printf("[WARNING] ACI/KC MemoryMap: FAIL (0x%016" PRIx64 " - 0x%016" PRIx64 " (perm=%s) (type=%s) not permitted)\n", (uint64_t)map.addr << 12, ((uint64_t)(map.addr + map.size) << 12) - 1, kMemMapPerm[map.perm].c_str(), kMemMapType[map.type].c_str());
 		}
@@ -484,7 +484,7 @@ void NpdmProcess::validateAciFromAcid(const nx::AccessControlInfoBinary& aci, co
 
 		if (rightFound == false)
 		{
-			const nx::MemoryMappingHandler::sMemoryMapping& map = aci.getKernelCapabilities().getMemoryMaps().getIoMemoryMaps()[i];
+			const nn::hac::MemoryMappingHandler::sMemoryMapping& map = aci.getKernelCapabilities().getMemoryMaps().getIoMemoryMaps()[i];
 
 			printf("[WARNING] ACI/KC IoMemoryMap: FAIL (0x%016" PRIx64 " - 0x%016" PRIx64 " (perm=%s) (type=%s) not permitted)\n", (uint64_t)map.addr << 12, ((uint64_t)(map.addr + map.size) << 12) - 1, kMemMapPerm[map.perm].c_str(), kMemMapType[map.type].c_str());
 		}
@@ -538,7 +538,7 @@ void NpdmProcess::validateAciFromAcid(const nx::AccessControlInfoBinary& aci, co
 	}
 }
 
-void NpdmProcess::displayNpdmHeader(const nx::NpdmBinary& hdr)
+void NpdmProcess::displayNpdmHeader(const nn::hac::NpdmBinary& hdr)
 {
 	printf("[NPDM HEADER]\n");
 	printf("  Process Architecture Params:\n");
@@ -557,13 +557,13 @@ void NpdmProcess::displayNpdmHeader(const nx::NpdmBinary& hdr)
 	}
 }
 
-void NpdmProcess::displayAciHdr(const nx::AccessControlInfoBinary& aci)
+void NpdmProcess::displayAciHdr(const nn::hac::AccessControlInfoBinary& aci)
 {
 	printf("[Access Control Info]\n");
 	printf("  ProgramID:       0x%016" PRIx64 "\n", aci.getProgramId());
 }
 
-void NpdmProcess::displayAciDescHdr(const nx::AccessControlInfoDescBinary& acid)
+void NpdmProcess::displayAciDescHdr(const nn::hac::AccessControlInfoDescBinary& acid)
 {
 	printf("[Access Control Info Desc]\n");
 	if (acid.getFlagList().size() > 0 || _HAS_BIT(mCliOutputMode, OUTPUT_EXTENDED))
@@ -579,7 +579,7 @@ void NpdmProcess::displayAciDescHdr(const nx::AccessControlInfoDescBinary& acid)
 	printf("    Max:           0x%016" PRIx64 "\n", acid.getProgramIdRestrict().max);
 }
 
-void NpdmProcess::displayFac(const nx::FileSystemAccessControlBinary& fac)
+void NpdmProcess::displayFac(const nn::hac::FileSystemAccessControlBinary& fac)
 {
 	printf("[FS Access Control]\n");
 	printf("  Format Version:  %d\n", fac.getFormatVersion());
@@ -620,7 +620,7 @@ void NpdmProcess::displayFac(const nx::FileSystemAccessControlBinary& fac)
 	
 }
 
-void NpdmProcess::displaySac(const nx::ServiceAccessControlBinary& sac)
+void NpdmProcess::displaySac(const nn::hac::ServiceAccessControlBinary& sac)
 {
 	printf("[Service Access Control]\n");
 	printf("  Service List:\n");
@@ -634,12 +634,12 @@ void NpdmProcess::displaySac(const nx::ServiceAccessControlBinary& sac)
 	}
 }
 
-void NpdmProcess::displayKernelCap(const nx::KernelCapabilityBinary& kern)
+void NpdmProcess::displayKernelCap(const nn::hac::KernelCapabilityBinary& kern)
 {
 	printf("[Kernel Capabilities]\n");
 	if (kern.getThreadInfo().isSet())
 	{
-		nx::ThreadInfoHandler threadInfo = kern.getThreadInfo();
+		nn::hac::ThreadInfoHandler threadInfo = kern.getThreadInfo();
 		printf("  Thread Priority:\n");
 		printf("    Min:     %d\n", threadInfo.getMinPriority());
 		printf("    Max:     %d\n", threadInfo.getMaxPriority());
@@ -666,8 +666,8 @@ void NpdmProcess::displayKernelCap(const nx::KernelCapabilityBinary& kern)
 	}
 	if (kern.getMemoryMaps().isSet())
 	{
-		fnd::List<nx::MemoryMappingHandler::sMemoryMapping> maps = kern.getMemoryMaps().getMemoryMaps();
-		fnd::List<nx::MemoryMappingHandler::sMemoryMapping> ioMaps = kern.getMemoryMaps().getIoMemoryMaps();
+		fnd::List<nn::hac::MemoryMappingHandler::sMemoryMapping> maps = kern.getMemoryMaps().getMemoryMaps();
+		fnd::List<nn::hac::MemoryMappingHandler::sMemoryMapping> ioMaps = kern.getMemoryMaps().getIoMemoryMaps();
 
 		printf("  MemoryMaps:\n");
 		for (size_t i = 0; i < maps.size(); i++)
@@ -707,7 +707,7 @@ void NpdmProcess::displayKernelCap(const nx::KernelCapabilityBinary& kern)
 	}
 	if (kern.getMiscFlags().isSet())
 	{
-		fnd::List<nx::MiscFlagsHandler::Flags> flagList = kern.getMiscFlags().getFlagList();
+		fnd::List<nn::hac::MiscFlagsHandler::Flags> flagList = kern.getMiscFlags().getFlagList();
 
 		printf("  Misc Flags:\n");
 		for (uint32_t i = 0; i < flagList.size(); i++)
diff --git a/programs/nstool/source/NpdmProcess.h b/programs/nstool/source/NpdmProcess.h
index 12264c8..6ed8959 100644
--- a/programs/nstool/source/NpdmProcess.h
+++ b/programs/nstool/source/NpdmProcess.h
@@ -2,7 +2,7 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/IFile.h>
-#include <nx/NpdmBinary.h>
+#include <nn/hac/NpdmBinary.h>
 
 #include "nstool.h"
 
@@ -19,7 +19,7 @@ public:
 	void setCliOutputMode(CliOutputMode type);
 	void setVerifyMode(bool verify);
 
-	const nx::NpdmBinary& getNpdmBinary() const;
+	const nn::hac::NpdmBinary& getNpdmBinary() const;
 
 private:
 	const std::string kModuleName = "NpdmProcess";
@@ -30,15 +30,15 @@ private:
 	CliOutputMode mCliOutputMode;
 	bool mVerify;
 
-	nx::NpdmBinary mNpdm;
+	nn::hac::NpdmBinary mNpdm;
 
-	void validateAcidSignature(const nx::AccessControlInfoDescBinary& acid);
-	void validateAciFromAcid(const nx::AccessControlInfoBinary& aci, const nx::AccessControlInfoDescBinary& acid);
+	void validateAcidSignature(const nn::hac::AccessControlInfoDescBinary& acid);
+	void validateAciFromAcid(const nn::hac::AccessControlInfoBinary& aci, const nn::hac::AccessControlInfoDescBinary& acid);
 
-	void displayNpdmHeader(const nx::NpdmBinary& hdr);
-	void displayAciHdr(const nx::AccessControlInfoBinary& aci);
-	void displayAciDescHdr(const nx::AccessControlInfoDescBinary& aci);
-	void displayFac(const nx::FileSystemAccessControlBinary& fac);
-	void displaySac(const nx::ServiceAccessControlBinary& sac);
-	void displayKernelCap(const nx::KernelCapabilityBinary& kern);
+	void displayNpdmHeader(const nn::hac::NpdmBinary& hdr);
+	void displayAciHdr(const nn::hac::AccessControlInfoBinary& aci);
+	void displayAciDescHdr(const nn::hac::AccessControlInfoDescBinary& aci);
+	void displayFac(const nn::hac::FileSystemAccessControlBinary& fac);
+	void displaySac(const nn::hac::ServiceAccessControlBinary& sac);
+	void displayKernelCap(const nn::hac::KernelCapabilityBinary& kern);
 };
\ No newline at end of file
diff --git a/programs/nstool/source/NroProcess.cpp b/programs/nstool/source/NroProcess.cpp
index 1ecb652..694ad38 100644
--- a/programs/nstool/source/NroProcess.cpp
+++ b/programs/nstool/source/NroProcess.cpp
@@ -1,7 +1,7 @@
 #include <fnd/SimpleTextOutput.h>
 #include <fnd/Vec.h>
 #include <compress/lz4.h>
-#include <nx/nro-hb.h>
+#include <nn/hac/nro-hb.h>
 #include "OffsetAdjustedIFile.h"
 #include "NroProcess.h"
 
@@ -56,7 +56,7 @@ void NroProcess::setVerifyMode(bool verify)
 	mVerify = verify;
 }
 
-void NroProcess::setInstructionType(nx::npdm::InstructionType type)
+void NroProcess::setInstructionType(nn::hac::npdm::InstructionType type)
 {
 	mRoMeta.setInstructionType(type);
 }
@@ -99,19 +99,19 @@ const RoMetadataProcess& NroProcess::getRoMetadataProcess() const
 void NroProcess::importHeader()
 {
 	fnd::Vec<byte_t> scratch;
-	if (mFile->size() < sizeof(nx::sNroHeader))
+	if (mFile->size() < sizeof(nn::hac::sNroHeader))
 	{
 		throw fnd::Exception(kModuleName, "Corrupt NRO: file too small");
 	}
 
-	scratch.alloc(sizeof(nx::sNroHeader));
+	scratch.alloc(sizeof(nn::hac::sNroHeader));
 	mFile->read(scratch.data(), 0, scratch.size());
 
 	mHdr.fromBytes(scratch.data(), scratch.size());
 
 	// setup homebrew extension
-	nx::sNroHeader* raw_hdr = (nx::sNroHeader*)scratch.data();
-	if (((le_uint64_t*)raw_hdr->reserved_0)->get() == nx::nro::kNroHomebrewStructMagic && mFile->size() > mHdr.getNroSize())
+	nn::hac::sNroHeader* raw_hdr = (nn::hac::sNroHeader*)scratch.data();
+	if (((le_uint64_t*)raw_hdr->reserved_0)->get() == nn::hac::nro::kNroHomebrewStructMagic && mFile->size() > mHdr.getNroSize())
 	{
 		mIsHomebrewNro = true;
 		mAssetProc.setInputFile(new OffsetAdjustedIFile(mFile, false, mHdr.getNroSize(), mFile->size() - mHdr.getNroSize()), true);
@@ -137,10 +137,10 @@ void NroProcess::displayHeader()
 #define _HEXDUMP_L(var, len) do { for (size_t a__a__A = 0; a__a__A < len; a__a__A++) printf("%02x", var[a__a__A]); } while(0)
 	printf("[NRO Header]\n");
 	printf("  RoCrt:       ");
-	_HEXDUMP_L(mHdr.getRoCrt().data, nx::nro::kRoCrtSize);
+	_HEXDUMP_L(mHdr.getRoCrt().data, nn::hac::nro::kRoCrtSize);
 	printf("\n");
 	printf("  ModuleId:    ");
-	_HEXDUMP_L(mHdr.getModuleId().data, nx::nro::kModuleIdSize);
+	_HEXDUMP_L(mHdr.getModuleId().data, nn::hac::nro::kModuleIdSize);
 	printf("\n");
 	printf("  NroSize:     0x%" PRIx32 "\n", mHdr.getNroSize());
 	printf("  Program Sections:\n");
diff --git a/programs/nstool/source/NroProcess.h b/programs/nstool/source/NroProcess.h
index 6fbdf59..12f1eb8 100644
--- a/programs/nstool/source/NroProcess.h
+++ b/programs/nstool/source/NroProcess.h
@@ -3,8 +3,8 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/IFile.h>
-#include <nx/npdm.h>
-#include <nx/NroHeader.h>
+#include <nn/hac/npdm.h>
+#include <nn/hac/NroHeader.h>
 #include "AssetProcess.h"
 
 #include "nstool.h"
@@ -22,7 +22,7 @@ public:
 	void setCliOutputMode(CliOutputMode type);
 	void setVerifyMode(bool verify);
 
-	void setInstructionType(nx::npdm::InstructionType type);
+	void setInstructionType(nn::hac::npdm::InstructionType type);
 	void setListApi(bool listApi);
 	void setListSymbols(bool listSymbols);
 
@@ -42,7 +42,7 @@ private:
 	CliOutputMode mCliOutputMode;
 	bool mVerify;
 
-	nx::NroHeader mHdr;
+	nn::hac::NroHeader mHdr;
 	fnd::Vec<byte_t> mTextBlob, mRoBlob, mDataBlob;
 	RoMetadataProcess mRoMeta;
 	bool mIsHomebrewNro;
diff --git a/programs/nstool/source/NsoProcess.cpp b/programs/nstool/source/NsoProcess.cpp
index ff81e7f..3f5653f 100644
--- a/programs/nstool/source/NsoProcess.cpp
+++ b/programs/nstool/source/NsoProcess.cpp
@@ -51,7 +51,7 @@ void NsoProcess::setVerifyMode(bool verify)
 	mVerify = verify;
 }
 
-void NsoProcess::setInstructionType(nx::npdm::InstructionType type)
+void NsoProcess::setInstructionType(nn::hac::npdm::InstructionType type)
 {
 	mRoMeta.setInstructionType(type);
 }
@@ -74,12 +74,12 @@ const RoMetadataProcess& NsoProcess::getRoMetadataProcess() const
 void NsoProcess::importHeader()
 {
 	fnd::Vec<byte_t> scratch;
-	if (mFile->size() < sizeof(nx::sNsoHeader))
+	if (mFile->size() < sizeof(nn::hac::sNsoHeader))
 	{
 		throw fnd::Exception(kModuleName, "Corrupt NSO: file too small");
 	}
 
-	scratch.alloc(sizeof(nx::sNsoHeader));
+	scratch.alloc(sizeof(nn::hac::sNsoHeader));
 	mFile->read(scratch.data(), 0, scratch.size());
 
 	mHdr.fromBytes(scratch.data(), scratch.size());
@@ -176,7 +176,7 @@ void NsoProcess::displayNsoHeader()
 
 	printf("[NSO Header]\n");
 	printf("  ModuleId:           ");
-	_HEXDUMP_L(mHdr.getModuleId().data, nx::nso::kModuleIdSize);
+	_HEXDUMP_L(mHdr.getModuleId().data, nn::hac::nso::kModuleIdSize);
 	printf("\n");
 	if (_HAS_BIT(mCliOutputMode, OUTPUT_LAYOUT))
 	{
diff --git a/programs/nstool/source/NsoProcess.h b/programs/nstool/source/NsoProcess.h
index 9088da2..0cf57c0 100644
--- a/programs/nstool/source/NsoProcess.h
+++ b/programs/nstool/source/NsoProcess.h
@@ -3,8 +3,8 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/IFile.h>
-#include <nx/npdm.h>
-#include <nx/NsoHeader.h>
+#include <nn/hac/npdm.h>
+#include <nn/hac/NsoHeader.h>
 
 #include "nstool.h"
 #include "RoMetadataProcess.h"
@@ -21,7 +21,7 @@ public:
 	void setCliOutputMode(CliOutputMode type);
 	void setVerifyMode(bool verify);
 
-	void setInstructionType(nx::npdm::InstructionType type);
+	void setInstructionType(nn::hac::npdm::InstructionType type);
 	void setListApi(bool listApi);
 	void setListSymbols(bool listSymbols);
 
@@ -34,11 +34,11 @@ private:
 
 	CliOutputMode mCliOutputMode;
 	bool mVerify;
-	nx::npdm::InstructionType mInstructionType;
+	nn::hac::npdm::InstructionType mInstructionType;
 	bool mListApi;
 	bool mListSymbols;
 
-	nx::NsoHeader mHdr;
+	nn::hac::NsoHeader mHdr;
 	fnd::Vec<byte_t> mTextBlob, mRoBlob, mDataBlob;
 	RoMetadataProcess mRoMeta;
 
diff --git a/programs/nstool/source/PfsProcess.cpp b/programs/nstool/source/PfsProcess.cpp
index 59f2921..646f83f 100644
--- a/programs/nstool/source/PfsProcess.cpp
+++ b/programs/nstool/source/PfsProcess.cpp
@@ -33,13 +33,13 @@ void PfsProcess::process()
 	}
 	
 	// open minimum header to get full header size
-	scratch.alloc(sizeof(nx::sPfsHeader));
+	scratch.alloc(sizeof(nn::hac::sPfsHeader));
 	mFile->read(scratch.data(), 0, scratch.size());
-	if (validateHeaderMagic(((nx::sPfsHeader*)scratch.data())) == false)
+	if (validateHeaderMagic(((nn::hac::sPfsHeader*)scratch.data())) == false)
 	{
 		throw fnd::Exception(kModuleName, "Corrupt Header");
 	}
-	size_t pfsHeaderSize = determineHeaderSize(((nx::sPfsHeader*)scratch.data()));
+	size_t pfsHeaderSize = determineHeaderSize(((nn::hac::sPfsHeader*)scratch.data()));
 	
 	// open minimum header to get full header size
 	scratch.alloc(pfsHeaderSize);
@@ -90,7 +90,7 @@ void PfsProcess::setListFs(bool list_fs)
 	mListFs = list_fs;
 }
 
-const nx::PfsHeader& PfsProcess::getPfsHeader() const
+const nn::hac::PfsHeader& PfsProcess::getPfsHeader() const
 {
 	return mPfs;
 }
@@ -124,26 +124,26 @@ void PfsProcess::displayFs()
 	}
 }
 
-size_t PfsProcess::determineHeaderSize(const nx::sPfsHeader* hdr)
+size_t PfsProcess::determineHeaderSize(const nn::hac::sPfsHeader* hdr)
 {
 	size_t fileEntrySize = 0;
-	if (hdr->st_magic.get() == nx::pfs::kPfsStructMagic)
-		fileEntrySize = sizeof(nx::sPfsFile);
+	if (hdr->st_magic.get() == nn::hac::pfs::kPfsStructMagic)
+		fileEntrySize = sizeof(nn::hac::sPfsFile);
 	else
-		fileEntrySize = sizeof(nx::sHashedPfsFile);
+		fileEntrySize = sizeof(nn::hac::sHashedPfsFile);
 
-	return sizeof(nx::sPfsHeader) + hdr->file_num.get() * fileEntrySize + hdr->name_table_size.get();
+	return sizeof(nn::hac::sPfsHeader) + hdr->file_num.get() * fileEntrySize + hdr->name_table_size.get();
 }
 
-bool PfsProcess::validateHeaderMagic(const nx::sPfsHeader* hdr)
+bool PfsProcess::validateHeaderMagic(const nn::hac::sPfsHeader* hdr)
 {
-	return hdr->st_magic.get() == nx::pfs::kPfsStructMagic || hdr->st_magic.get() == nx::pfs::kHashedPfsStructMagic;
+	return hdr->st_magic.get() == nn::hac::pfs::kPfsStructMagic || hdr->st_magic.get() == nn::hac::pfs::kHashedPfsStructMagic;
 }
 
 void PfsProcess::validateHfs()
 {
 	crypto::sha::sSha256Hash hash;
-	const fnd::List<nx::PfsHeader::sFile>& file = mPfs.getFileList();
+	const fnd::List<nn::hac::PfsHeader::sFile>& file = mPfs.getFileList();
 	for (size_t i = 0; i < file.size(); i++)
 	{
 		mCache.alloc(file[i].hash_protected_size);
@@ -165,7 +165,7 @@ void PfsProcess::extractFs()
 	fnd::io::makeDirectory(mExtractPath);
 
 	fnd::SimpleFile outFile;
-	const fnd::List<nx::PfsHeader::sFile>& file = mPfs.getFileList();
+	const fnd::List<nn::hac::PfsHeader::sFile>& file = mPfs.getFileList();
 
 	std::string file_path;
 	for (size_t i = 0; i < file.size(); i++)
diff --git a/programs/nstool/source/PfsProcess.h b/programs/nstool/source/PfsProcess.h
index 3c90db9..4b15c05 100644
--- a/programs/nstool/source/PfsProcess.h
+++ b/programs/nstool/source/PfsProcess.h
@@ -2,7 +2,7 @@
 #include <string>
 #include <fnd/types.h>
 #include <fnd/IFile.h>
-#include <nx/PfsHeader.h>
+#include <nn/hac/PfsHeader.h>
 
 #include "nstool.h"
 
@@ -24,7 +24,7 @@ public:
 	void setExtractPath(const std::string& path);
 	void setListFs(bool list_fs);
 
-	const nx::PfsHeader& getPfsHeader() const;
+	const nn::hac::PfsHeader& getPfsHeader() const;
 
 private:
 	const std::string kModuleName = "PfsProcess";
@@ -42,12 +42,12 @@ private:
 
 	fnd::Vec<byte_t> mCache;
 
-	nx::PfsHeader mPfs;
+	nn::hac::PfsHeader mPfs;
 
 	void displayHeader();
 	void displayFs();
-	size_t determineHeaderSize(const nx::sPfsHeader* hdr);
-	bool validateHeaderMagic(const nx::sPfsHeader* hdr);
+	size_t determineHeaderSize(const nn::hac::sPfsHeader* hdr);
+	bool validateHeaderMagic(const nn::hac::sPfsHeader* hdr);
 	void validateHfs();
 	void extractFs();
 };
\ No newline at end of file
diff --git a/programs/nstool/source/PkiCertProcess.cpp b/programs/nstool/source/PkiCertProcess.cpp
index 80f3b20..47b3267 100644
--- a/programs/nstool/source/PkiCertProcess.cpp
+++ b/programs/nstool/source/PkiCertProcess.cpp
@@ -2,7 +2,7 @@
 #include <iomanip>
 
 #include <fnd/SimpleTextOutput.h>
-#include <pki/SignUtils.h>
+#include <nn/pki/SignUtils.h>
 #include "OffsetAdjustedIFile.h"
 #include "PkiCertProcess.h"
 #include "PkiValidator.h"
diff --git a/programs/nstool/source/PkiCertProcess.h b/programs/nstool/source/PkiCertProcess.h
index 31c63b2..b071ec6 100644
--- a/programs/nstool/source/PkiCertProcess.h
+++ b/programs/nstool/source/PkiCertProcess.h
@@ -4,8 +4,8 @@
 #include <fnd/IFile.h>
 #include <fnd/List.h>
 #include <fnd/Vec.h>
-#include <pki/SignedData.h>
-#include <pki/CertificateBody.h>
+#include <nn/pki/SignedData.h>
+#include <nn/pki/CertificateBody.h>
 #include "nstool.h"
 
 class PkiCertProcess
diff --git a/programs/nstool/source/PkiValidator.cpp b/programs/nstool/source/PkiValidator.cpp
index 00b2088..70f5728 100644
--- a/programs/nstool/source/PkiValidator.cpp
+++ b/programs/nstool/source/PkiValidator.cpp
@@ -2,7 +2,7 @@
 #include <iostream>
 #include <iomanip>
 #include <sstream>
-#include <pki/SignUtils.h>
+#include <nn/pki/SignUtils.h>
 
 PkiValidator::PkiValidator()
 {
diff --git a/programs/nstool/source/PkiValidator.h b/programs/nstool/source/PkiValidator.h
index 217dfad..51d383f 100644
--- a/programs/nstool/source/PkiValidator.h
+++ b/programs/nstool/source/PkiValidator.h
@@ -3,8 +3,8 @@
 #include <fnd/List.h>
 #include <fnd/Vec.h>
 #include <crypto/rsa.h>
-#include <pki/SignedData.h>
-#include <pki/CertificateBody.h>
+#include <nn/pki/SignedData.h>
+#include <nn/pki/CertificateBody.h>
 #include <string>
 
 class PkiValidator
diff --git a/programs/nstool/source/RoMetadataProcess.cpp b/programs/nstool/source/RoMetadataProcess.cpp
index af06e44..3c44d2b 100644
--- a/programs/nstool/source/RoMetadataProcess.cpp
+++ b/programs/nstool/source/RoMetadataProcess.cpp
@@ -5,7 +5,7 @@
 
 RoMetadataProcess::RoMetadataProcess() :
 	mCliOutputMode(_BIT(OUTPUT_BASIC)),
-	mInstructionType(nx::npdm::INSTR_64BIT),
+	mInstructionType(nn::hac::npdm::INSTR_64BIT),
 	mListApi(false),
 	mListSymbols(false),
 	mApiInfo(),
@@ -59,7 +59,7 @@ void RoMetadataProcess::setCliOutputMode(CliOutputMode type)
 	mCliOutputMode = type;
 }
 
-void RoMetadataProcess::setInstructionType(nx::npdm::InstructionType type)
+void RoMetadataProcess::setInstructionType(nn::hac::npdm::InstructionType type)
 {
 	mInstructionType = type;
 }
@@ -123,7 +123,7 @@ void RoMetadataProcess::importApiList()
 
 	if (mDynSym.size > 0)
 	{
-		mSymbolList.parseData(mRoBlob.data() + mDynSym.offset, mDynSym.size, mRoBlob.data() + mDynStr.offset, mDynStr.size, mInstructionType == nx::npdm::INSTR_64BIT);
+		mSymbolList.parseData(mRoBlob.data() + mDynSym.offset, mDynSym.size, mRoBlob.data() + mDynStr.offset, mDynStr.size, mInstructionType == nn::hac::npdm::INSTR_64BIT);
 	}
 }
 
@@ -174,30 +174,30 @@ void RoMetadataProcess::displayRoMetaData()
 	}
 }
 
-const char* RoMetadataProcess::getSectionIndexStr(nx::elf::SpecialSectionIndex shn_index) const
+const char* RoMetadataProcess::getSectionIndexStr(nn::hac::elf::SpecialSectionIndex shn_index) const
 {
 	const char* str;
 	switch (shn_index)
 	{
-		case (nx::elf::SHN_UNDEF):
+		case (nn::hac::elf::SHN_UNDEF):
 			str = "UNDEF";
 			break;
-		case (nx::elf::SHN_LOPROC):
+		case (nn::hac::elf::SHN_LOPROC):
 			str = "LOPROC";
 			break;
-		case (nx::elf::SHN_HIPROC):
+		case (nn::hac::elf::SHN_HIPROC):
 			str = "HIPROC";
 			break;
-		case (nx::elf::SHN_LOOS):
+		case (nn::hac::elf::SHN_LOOS):
 			str = "LOOS";
 			break;
-		case (nx::elf::SHN_HIOS):
+		case (nn::hac::elf::SHN_HIOS):
 			str = "HIOS";
 			break;
-		case (nx::elf::SHN_ABS):
+		case (nn::hac::elf::SHN_ABS):
 			str = "ABS";
 			break;
-		case (nx::elf::SHN_COMMON):
+		case (nn::hac::elf::SHN_COMMON):
 			str = "COMMON";
 			break;
 		default:
@@ -207,36 +207,36 @@ const char* RoMetadataProcess::getSectionIndexStr(nx::elf::SpecialSectionIndex s
 	return str;
 }
 
-const char* RoMetadataProcess::getSymbolTypeStr(nx::elf::SymbolType symbol_type) const
+const char* RoMetadataProcess::getSymbolTypeStr(nn::hac::elf::SymbolType symbol_type) const
 {
 	const char* str;
 	switch (symbol_type)
 	{
-		case (nx::elf::STT_NOTYPE):
+		case (nn::hac::elf::STT_NOTYPE):
 			str = "NOTYPE";
 			break;
-		case (nx::elf::STT_OBJECT):
+		case (nn::hac::elf::STT_OBJECT):
 			str = "OBJECT";
 			break;
-		case (nx::elf::STT_FUNC):
+		case (nn::hac::elf::STT_FUNC):
 			str = "FUNC";
 			break;
-		case (nx::elf::STT_SECTION):
+		case (nn::hac::elf::STT_SECTION):
 			str = "SECTION";
 			break;
-		case (nx::elf::STT_FILE):
+		case (nn::hac::elf::STT_FILE):
 			str = "FILE";
 			break;
-		case (nx::elf::STT_LOOS):
+		case (nn::hac::elf::STT_LOOS):
 			str = "LOOS";
 			break;
-		case (nx::elf::STT_HIOS):
+		case (nn::hac::elf::STT_HIOS):
 			str = "HIOS";
 			break;
-		case (nx::elf::STT_LOPROC):
+		case (nn::hac::elf::STT_LOPROC):
 			str = "LOPROC";
 			break;
-		case (nx::elf::STT_HIPROC):
+		case (nn::hac::elf::STT_HIPROC):
 			str = "HIPROC";
 			break;
 		default:
@@ -246,30 +246,30 @@ const char* RoMetadataProcess::getSymbolTypeStr(nx::elf::SymbolType symbol_type)
 	return str;
 }
 
-const char* RoMetadataProcess::getSymbolBindingStr(nx::elf::SymbolBinding symbol_binding) const
+const char* RoMetadataProcess::getSymbolBindingStr(nn::hac::elf::SymbolBinding symbol_binding) const
 {
 	const char* str;
 	switch (symbol_binding)
 	{
-		case (nx::elf::STB_LOCAL):
+		case (nn::hac::elf::STB_LOCAL):
 			str = "LOCAL";
 			break;
-		case (nx::elf::STB_GLOBAL):
+		case (nn::hac::elf::STB_GLOBAL):
 			str = "GLOBAL";
 			break;
-		case (nx::elf::STB_WEAK):
+		case (nn::hac::elf::STB_WEAK):
 			str = "WEAK";
 			break;
-		case (nx::elf::STB_LOOS):
+		case (nn::hac::elf::STB_LOOS):
 			str = "LOOS";
 			break;
-		case (nx::elf::STB_HIOS):
+		case (nn::hac::elf::STB_HIOS):
 			str = "HIOS";
 			break;
-		case (nx::elf::STB_LOPROC):
+		case (nn::hac::elf::STB_LOPROC):
 			str = "LOPROC";
 			break;
-		case (nx::elf::STB_HIPROC):
+		case (nn::hac::elf::STB_HIPROC):
 			str = "HIPROC";
 			break;
 		default:
diff --git a/programs/nstool/source/RoMetadataProcess.h b/programs/nstool/source/RoMetadataProcess.h
index 477374f..84ff4af 100644
--- a/programs/nstool/source/RoMetadataProcess.h
+++ b/programs/nstool/source/RoMetadataProcess.h
@@ -4,7 +4,7 @@
 #include <fnd/types.h>
 #include <fnd/Vec.h>
 
-#include <nx/npdm.h>
+#include <nn/hac/npdm.h>
 
 #include "nstool.h"
 #include "SdkApiString.h"
@@ -24,7 +24,7 @@ public:
 
 	void setCliOutputMode(CliOutputMode type);
 
-	void setInstructionType(nx::npdm::InstructionType type);
+	void setInstructionType(nn::hac::npdm::InstructionType type);
 	void setListApi(bool listApi);
 	void setListSymbols(bool listSymbols);
 
@@ -37,7 +37,7 @@ private:
 	const std::string kModuleName = "RoMetadataProcess";
 
 	CliOutputMode mCliOutputMode;
-	nx::npdm::InstructionType mInstructionType;
+	nn::hac::npdm::InstructionType mInstructionType;
 	bool mListApi;
 	bool mListSymbols;	
 
@@ -62,7 +62,7 @@ private:
 	void importApiList();
 	void displayRoMetaData();
 
-	const char* getSectionIndexStr(nx::elf::SpecialSectionIndex shn_index) const;
-	const char* getSymbolTypeStr(nx::elf::SymbolType symbol_type) const;
-	const char* getSymbolBindingStr(nx::elf::SymbolBinding symbol_binding) const;
+	const char* getSectionIndexStr(nn::hac::elf::SpecialSectionIndex shn_index) const;
+	const char* getSymbolTypeStr(nn::hac::elf::SymbolType symbol_type) const;
+	const char* getSymbolBindingStr(nn::hac::elf::SymbolBinding symbol_binding) const;
 };
\ No newline at end of file
diff --git a/programs/nstool/source/RomfsProcess.cpp b/programs/nstool/source/RomfsProcess.cpp
index 47982f5..c2baf8c 100644
--- a/programs/nstool/source/RomfsProcess.cpp
+++ b/programs/nstool/source/RomfsProcess.cpp
@@ -182,17 +182,17 @@ void RomfsProcess::extractFs()
 	extractDir(mExtractPath, mRootDir);
 }
 
-bool RomfsProcess::validateHeaderLayout(const nx::sRomfsHeader* hdr) const
+bool RomfsProcess::validateHeaderLayout(const nn::hac::sRomfsHeader* hdr) const
 {
 	bool validLayout = true;
 
-	if (hdr->header_size.get() != sizeof(nx::sRomfsHeader))
+	if (hdr->header_size.get() != sizeof(nn::hac::sRomfsHeader))
 	{
 		validLayout = false;
 	}
 
 	uint64_t pos = hdr->sections[0].offset.get();
-	for (size_t i = 0; i < nx::romfs::SECTION_NUM; i++)
+	for (size_t i = 0; i < nn::hac::romfs::SECTION_NUM; i++)
 	{
 		if (hdr->sections[i].offset.get() != pos)
 		{
@@ -206,7 +206,7 @@ bool RomfsProcess::validateHeaderLayout(const nx::sRomfsHeader* hdr) const
 
 void RomfsProcess::importDirectory(uint32_t dir_offset, sDirectory& dir)
 {
-	nx::sRomfsDirEntry* d_node = get_dir_node(dir_offset);
+	nn::hac::sRomfsDirEntry* d_node = get_dir_node(dir_offset);
 
 	/*
 	printf("[DIR-NODE]\n");
@@ -219,9 +219,9 @@ void RomfsProcess::importDirectory(uint32_t dir_offset, sDirectory& dir)
 	printf("  name=%s\n", d_node->name);
 	*/
 
-	for (uint32_t file_addr = d_node->file.get(); file_addr != nx::romfs::kInvalidAddr; )
+	for (uint32_t file_addr = d_node->file.get(); file_addr != nn::hac::romfs::kInvalidAddr; )
 	{
-		nx::sRomfsFileEntry* f_node = get_file_node(file_addr);
+		nn::hac::sRomfsFileEntry* f_node = get_file_node(file_addr);
 
 		/*
 		printf("[FILE-NODE]\n");
@@ -240,9 +240,9 @@ void RomfsProcess::importDirectory(uint32_t dir_offset, sDirectory& dir)
 		mFileNum++;
 	}
 
-	for (uint32_t child_addr = d_node->child.get(); child_addr != nx::romfs::kInvalidAddr; )
+	for (uint32_t child_addr = d_node->child.get(); child_addr != nn::hac::romfs::kInvalidAddr; )
 	{
-		nx::sRomfsDirEntry* c_node = get_dir_node(child_addr);
+		nn::hac::sRomfsDirEntry* c_node = get_dir_node(child_addr);
 
 		dir.dir_list.addElement({std::string(c_node->name(), c_node->name_size.get())});
 		importDirectory(child_addr, dir.dir_list.atBack());
@@ -255,7 +255,7 @@ void RomfsProcess::importDirectory(uint32_t dir_offset, sDirectory& dir)
 void RomfsProcess::resolveRomfs()
 {
 	// read header
-	mFile->read((byte_t*)&mHdr, 0, sizeof(nx::sRomfsHeader));
+	mFile->read((byte_t*)&mHdr, 0, sizeof(nn::hac::sRomfsHeader));
 
 	// logic check on the header layout
 	if (validateHeaderLayout(&mHdr) == false)
@@ -264,21 +264,21 @@ void RomfsProcess::resolveRomfs()
 	}
 
 	// read directory nodes
-	mDirNodes.alloc(mHdr.sections[nx::romfs::DIR_NODE_TABLE].size.get());
-	mFile->read(mDirNodes.data(), mHdr.sections[nx::romfs::DIR_NODE_TABLE].offset.get(), mDirNodes.size());
+	mDirNodes.alloc(mHdr.sections[nn::hac::romfs::DIR_NODE_TABLE].size.get());
+	mFile->read(mDirNodes.data(), mHdr.sections[nn::hac::romfs::DIR_NODE_TABLE].offset.get(), mDirNodes.size());
 	//printf("[RAW DIR NODES]\n");
 	//fnd::SimpleTextOutput::hxdStyleDump(mDirNodes.data(), mDirNodes.size());
 
 	// read file nodes
-	mFileNodes.alloc(mHdr.sections[nx::romfs::FILE_NODE_TABLE].size.get());
-	mFile->read(mFileNodes.data(), mHdr.sections[nx::romfs::FILE_NODE_TABLE].offset.get(), mFileNodes.size());
+	mFileNodes.alloc(mHdr.sections[nn::hac::romfs::FILE_NODE_TABLE].size.get());
+	mFile->read(mFileNodes.data(), mHdr.sections[nn::hac::romfs::FILE_NODE_TABLE].offset.get(), mFileNodes.size());
 	//printf("[RAW FILE NODES]\n");
 	//fnd::SimpleTextOutput::hxdStyleDump(mFileNodes.data(), mFileNodes.size());
 	
 	// A logic check on the root directory node
 	if (	get_dir_node(0)->parent.get() != 0 \
-		|| 	get_dir_node(0)->sibling.get() != nx::romfs::kInvalidAddr \
-		|| 	get_dir_node(0)->hash.get() != nx::romfs::kInvalidAddr \
+		|| 	get_dir_node(0)->sibling.get() != nn::hac::romfs::kInvalidAddr \
+		|| 	get_dir_node(0)->hash.get() != nn::hac::romfs::kInvalidAddr \
 		|| 	get_dir_node(0)->name_size.get() != 0)
 	{
 		throw fnd::Exception(kModuleName, "Invalid root directory node");
diff --git a/programs/nstool/source/RomfsProcess.h b/programs/nstool/source/RomfsProcess.h
index 032139c..475576c 100644
--- a/programs/nstool/source/RomfsProcess.h
+++ b/programs/nstool/source/RomfsProcess.h
@@ -4,7 +4,7 @@
 #include <fnd/IFile.h>
 #include <fnd/Vec.h>
 #include <fnd/List.h>
-#include <nx/romfs.h>
+#include <nn/hac/romfs.h>
 
 #include "nstool.h"
 
@@ -110,13 +110,13 @@ private:
 
 	size_t mDirNum;
 	size_t mFileNum;
-	nx::sRomfsHeader mHdr;
+	nn::hac::sRomfsHeader mHdr;
 	fnd::Vec<byte_t> mDirNodes;
 	fnd::Vec<byte_t> mFileNodes;
 	sDirectory mRootDir;
 
-	inline nx::sRomfsDirEntry* get_dir_node(uint32_t offset) { return (nx::sRomfsDirEntry*)(mDirNodes.data() + offset); }
-	inline nx::sRomfsFileEntry* get_file_node(uint32_t offset) { return (nx::sRomfsFileEntry*)(mFileNodes.data() + offset); }
+	inline nn::hac::sRomfsDirEntry* get_dir_node(uint32_t offset) { return (nn::hac::sRomfsDirEntry*)(mDirNodes.data() + offset); }
+	inline nn::hac::sRomfsFileEntry* get_file_node(uint32_t offset) { return (nn::hac::sRomfsFileEntry*)(mFileNodes.data() + offset); }
 
 	
 	void printTab(size_t tab) const;
@@ -129,7 +129,7 @@ private:
 	void extractDir(const std::string& path, const sDirectory& dir);
 	void extractFs();
 
-	bool validateHeaderLayout(const nx::sRomfsHeader* hdr) const;
+	bool validateHeaderLayout(const nn::hac::sRomfsHeader* hdr) const;
 	void importDirectory(uint32_t dir_offset, sDirectory& dir);
 	void resolveRomfs();
 };
\ No newline at end of file
diff --git a/programs/nstool/source/UserSettings.cpp b/programs/nstool/source/UserSettings.cpp
index f2c5297..57b5c84 100644
--- a/programs/nstool/source/UserSettings.cpp
+++ b/programs/nstool/source/UserSettings.cpp
@@ -11,22 +11,22 @@
 #include <fnd/SimpleTextOutput.h>
 #include <fnd/Vec.h>
 #include <fnd/ResourceFileReader.h>
-#include <nx/NcaUtils.h>
-#include <nx/AesKeygen.h>
-#include <nx/xci.h>
-#include <nx/pfs.h>
-#include <nx/nca.h>
-#include <nx/npdm.h>
-#include <nx/romfs.h>
-#include <nx/cnmt.h>
-#include <nx/nacp.h>
-#include <nx/nso.h>
-#include <nx/nro.h>
-#include <nx/aset.h>
-#include <pki/SignedData.h>
-#include <pki/CertificateBody.h>
-#include <pki/SignUtils.h>
-#include <es/TicketBody_V2.h>
+#include <nn/hac/NcaUtils.h>
+#include <nn/hac/AesKeygen.h>
+#include <nn/hac/xci.h>
+#include <nn/hac/pfs.h>
+#include <nn/hac/nca.h>
+#include <nn/hac/npdm.h>
+#include <nn/hac/romfs.h>
+#include <nn/hac/cnmt.h>
+#include <nn/hac/nacp.h>
+#include <nn/hac/nso.h>
+#include <nn/hac/nro.h>
+#include <nn/hac/aset.h>
+#include <nn/pki/SignedData.h>
+#include <nn/pki/CertificateBody.h>
+#include <nn/pki/SignUtils.h>
+#include <nn/es/TicketBody_V2.h>
 
 UserSettings::UserSettings()
 {}
@@ -129,7 +129,7 @@ bool UserSettings::isListSymbols() const
 	return mListSymbols;
 }
 
-nx::npdm::InstructionType UserSettings::getInstType() const
+nn::hac::npdm::InstructionType UserSettings::getInstType() const
 {
 	return mInstructionType;
 }
@@ -639,9 +639,9 @@ void UserSettings::populateKeyset(sCmdArgs& args)
 					if (mKeyset.nca.header_key == zeros_aes_xts_key)
 					{
 						crypto::aes::sAes128Key nca_header_kek;
-						nx::AesKeygen::generateKey(nca_header_kek.key, aes_kek_generation_source.key, nca_header_kek_source.key, aes_key_generation_source.key, master_key[i].key);
-						nx::AesKeygen::generateKey(mKeyset.nca.header_key.key[0], nca_header_key_source.key[0], nca_header_kek.key);
-						nx::AesKeygen::generateKey(mKeyset.nca.header_key.key[1], nca_header_key_source.key[1], nca_header_kek.key);
+						nn::hac::AesKeygen::generateKey(nca_header_kek.key, aes_kek_generation_source.key, nca_header_kek_source.key, aes_key_generation_source.key, master_key[i].key);
+						nn::hac::AesKeygen::generateKey(mKeyset.nca.header_key.key[0], nca_header_key_source.key[0], nca_header_kek.key);
+						nn::hac::AesKeygen::generateKey(mKeyset.nca.header_key.key[1], nca_header_key_source.key[1], nca_header_kek.key);
 						//printf("nca header key[0] ");
 						//fnd::SimpleTextOutput::hexDump(mKeyset.nca.header_key.key[0], 0x10);
 						//printf("nca header key[1] ");
@@ -649,11 +649,11 @@ void UserSettings::populateKeyset(sCmdArgs& args)
 					}
 				}
 
-				for (size_t j = 0; j < nx::nca::kKeyAreaEncryptionKeyNum; j++)
+				for (size_t j = 0; j < nn::hac::nca::kKeyAreaEncryptionKeyNum; j++)
 				{
 					if (key_area_key_source[j] != zeros_aes_key && mKeyset.nca.key_area_key[j][i] == zeros_aes_key)
 					{
-						nx::AesKeygen::generateKey(mKeyset.nca.key_area_key[j][i].key, aes_kek_generation_source.key, key_area_key_source[j].key, aes_key_generation_source.key, master_key[i].key);
+						nn::hac::AesKeygen::generateKey(mKeyset.nca.key_area_key[j][i].key, aes_kek_generation_source.key, key_area_key_source[j].key, aes_key_generation_source.key, master_key[i].key);
 						//printf("nca keak %d/%02d ", j, i);
 						//fnd::SimpleTextOutput::hexDump(mKeyset.nca.key_area_key[j][i].key, 0x10);
 					}
@@ -662,19 +662,19 @@ void UserSettings::populateKeyset(sCmdArgs& args)
 
 			if (ticket_titlekek_source != zeros_aes_key && mKeyset.ticket.titlekey_kek[i] == zeros_aes_key)
 			{
-				nx::AesKeygen::generateKey(mKeyset.ticket.titlekey_kek[i].key, ticket_titlekek_source.key, master_key[i].key);
+				nn::hac::AesKeygen::generateKey(mKeyset.ticket.titlekey_kek[i].key, ticket_titlekek_source.key, master_key[i].key);
 				//printf("ticket titlekek %02d ", i);
 				//fnd::SimpleTextOutput::hexDump(mKeyset.ticket.titlekey_kek[i].key, 0x10);
 			}
 			if (package2_key_source != zeros_aes_key && mKeyset.package2_key[i] == zeros_aes_key)
 			{
-				nx::AesKeygen::generateKey(mKeyset.package2_key[i].key, package2_key_source.key, master_key[i].key);
+				nn::hac::AesKeygen::generateKey(mKeyset.package2_key[i].key, package2_key_source.key, master_key[i].key);
 				//printf("package2 key %02d ", i);
 				//fnd::SimpleTextOutput::hexDump(mKeyset.package2_key[i].key, 0x10);
 			}
 		}
 		/*
-		for (size_t j = 0; j < nx::nca::kKeyAreaEncryptionKeyNum; j++)
+		for (size_t j = 0; j < nn::hac::nca::kKeyAreaEncryptionKeyNum; j++)
 		{
 			if (mKeyset.nca.key_area_key[j][i] != zeros_aes_key)
 			{
@@ -711,7 +711,7 @@ void UserSettings::populateUserSettings(sCmdArgs& args)
 	if (args.inst_type.isSet)
 		mInstructionType = getInstructionTypeFromString(*args.inst_type);
 	else
-		mInstructionType = nx::npdm::INSTR_64BIT; // default 64bit
+		mInstructionType = nn::hac::npdm::INSTR_64BIT; // default 64bit
 	
 	mListApi = args.list_api.isSet;
 	mListSymbols = args.list_sym.isSet;
@@ -823,19 +823,19 @@ FileType UserSettings::determineFileTypeFromFile(const std::string& path)
 #define _ASSERT_SIZE(sz) (scratch.size() >= (sz))
 
 	// test npdm
-	if (_ASSERT_SIZE(sizeof(nx::sXciHeaderPage)) && _TYPE_PTR(nx::sXciHeaderPage)->header.st_magic.get() == nx::xci::kXciStructMagic)
+	if (_ASSERT_SIZE(sizeof(nn::hac::sXciHeaderPage)) && _TYPE_PTR(nn::hac::sXciHeaderPage)->header.st_magic.get() == nn::hac::xci::kXciStructMagic)
 		file_type = FILE_XCI;
 	// test pfs0
-	else if (_ASSERT_SIZE(sizeof(nx::sPfsHeader)) && _TYPE_PTR(nx::sPfsHeader)->st_magic.get() == nx::pfs::kPfsStructMagic)
+	else if (_ASSERT_SIZE(sizeof(nn::hac::sPfsHeader)) && _TYPE_PTR(nn::hac::sPfsHeader)->st_magic.get() == nn::hac::pfs::kPfsStructMagic)
 		file_type = FILE_PARTITIONFS;
 	// test hfs0
-	else if (_ASSERT_SIZE(sizeof(nx::sPfsHeader)) && _TYPE_PTR(nx::sPfsHeader)->st_magic.get() == nx::pfs::kHashedPfsStructMagic)
+	else if (_ASSERT_SIZE(sizeof(nn::hac::sPfsHeader)) && _TYPE_PTR(nn::hac::sPfsHeader)->st_magic.get() == nn::hac::pfs::kHashedPfsStructMagic)
 		file_type = FILE_PARTITIONFS;
 	// test romfs
-	else if (_ASSERT_SIZE(sizeof(nx::sRomfsHeader)) && _TYPE_PTR(nx::sRomfsHeader)->header_size.get() == sizeof(nx::sRomfsHeader) && _TYPE_PTR(nx::sRomfsHeader)->sections[1].offset.get() == (_TYPE_PTR(nx::sRomfsHeader)->sections[0].offset.get() + _TYPE_PTR(nx::sRomfsHeader)->sections[0].size.get()))
+	else if (_ASSERT_SIZE(sizeof(nn::hac::sRomfsHeader)) && _TYPE_PTR(nn::hac::sRomfsHeader)->header_size.get() == sizeof(nn::hac::sRomfsHeader) && _TYPE_PTR(nn::hac::sRomfsHeader)->sections[1].offset.get() == (_TYPE_PTR(nn::hac::sRomfsHeader)->sections[0].offset.get() + _TYPE_PTR(nn::hac::sRomfsHeader)->sections[0].size.get()))
 		file_type = FILE_ROMFS;
 	// test npdm
-	else if (_ASSERT_SIZE(sizeof(nx::sNpdmHeader)) && _TYPE_PTR(nx::sNpdmHeader)->st_magic.get() == nx::npdm::kNpdmStructMagic)
+	else if (_ASSERT_SIZE(sizeof(nn::hac::sNpdmHeader)) && _TYPE_PTR(nn::hac::sNpdmHeader)->st_magic.get() == nn::hac::npdm::kNpdmStructMagic)
 		file_type = FILE_NPDM;
 	// test nca
 	else if (determineValidNcaFromSample(scratch))
@@ -847,10 +847,10 @@ FileType UserSettings::determineFileTypeFromFile(const std::string& path)
 	else if (determineValidNacpFromSample(scratch))
 		file_type = FILE_NACP;
 	// test nso
-	else if (_ASSERT_SIZE(sizeof(nx::sNsoHeader)) && _TYPE_PTR(nx::sNsoHeader)->st_magic.get() == nx::nso::kNsoStructMagic)
+	else if (_ASSERT_SIZE(sizeof(nn::hac::sNsoHeader)) && _TYPE_PTR(nn::hac::sNsoHeader)->st_magic.get() == nn::hac::nso::kNsoStructMagic)
 		file_type = FILE_NSO;
 	// test nso
-	else if (_ASSERT_SIZE(sizeof(nx::sNroHeader)) && _TYPE_PTR(nx::sNroHeader)->st_magic.get() == nx::nro::kNroStructMagic)
+	else if (_ASSERT_SIZE(sizeof(nn::hac::sNroHeader)) && _TYPE_PTR(nn::hac::sNroHeader)->st_magic.get() == nn::hac::nro::kNroStructMagic)
 		file_type = FILE_NRO;
 	// test pki certificate
 	else if (determineValidEsCertFromSample(scratch))
@@ -859,7 +859,7 @@ FileType UserSettings::determineFileTypeFromFile(const std::string& path)
 	else if (determineValidEsTikFromSample(scratch))
 		file_type = FILE_ES_TIK;
 	// test hb asset
-	else if (_ASSERT_SIZE(sizeof(nx::sAssetHeader)) && _TYPE_PTR(nx::sAssetHeader)->st_magic.get() == nx::aset::kAssetStructMagic)
+	else if (_ASSERT_SIZE(sizeof(nn::hac::sAssetHeader)) && _TYPE_PTR(nn::hac::sAssetHeader)->st_magic.get() == nn::hac::aset::kAssetStructMagic)
 		file_type = FILE_HB_ASSET;
 	// else unrecognised
 	else
@@ -874,15 +874,15 @@ FileType UserSettings::determineFileTypeFromFile(const std::string& path)
 bool UserSettings::determineValidNcaFromSample(const fnd::Vec<byte_t>& sample) const
 {
 	// prepare decrypted NCA data
-	byte_t nca_raw[nx::nca::kHeaderSize];
-	nx::sNcaHeader* nca_header = (nx::sNcaHeader*)(nca_raw + nx::NcaUtils::sectorToOffset(1));
+	byte_t nca_raw[nn::hac::nca::kHeaderSize];
+	nn::hac::sNcaHeader* nca_header = (nn::hac::sNcaHeader*)(nca_raw + nn::hac::NcaUtils::sectorToOffset(1));
 	
-	if (sample.size() < nx::nca::kHeaderSize)
+	if (sample.size() < nn::hac::nca::kHeaderSize)
 		return false;
 
-	nx::NcaUtils::decryptNcaHeader(sample.data(), nca_raw, mKeyset.nca.header_key);
+	nn::hac::NcaUtils::decryptNcaHeader(sample.data(), nca_raw, mKeyset.nca.header_key);
 
-	if (nca_header->st_magic.get() != nx::nca::kNca2StructMagic && nca_header->st_magic.get() != nx::nca::kNca3StructMagic)
+	if (nca_header->st_magic.get() != nn::hac::nca::kNca2StructMagic && nca_header->st_magic.get() != nn::hac::nca::kNca3StructMagic)
 		return false;
 
 	return true;
@@ -890,39 +890,39 @@ bool UserSettings::determineValidNcaFromSample(const fnd::Vec<byte_t>& sample) c
 
 bool UserSettings::determineValidCnmtFromSample(const fnd::Vec<byte_t>& sample) const
 {
-	if (sample.size() < sizeof(nx::sContentMetaHeader))
+	if (sample.size() < sizeof(nn::hac::sContentMetaHeader))
 		return false;
 
-	const nx::sContentMetaHeader* data = (const nx::sContentMetaHeader*)sample.data();
+	const nn::hac::sContentMetaHeader* data = (const nn::hac::sContentMetaHeader*)sample.data();
 
-	size_t minimum_size = sizeof(nx::sContentMetaHeader) + data->exhdr_size.get() + data->content_count.get() * sizeof(nx::sContentInfo) + data->content_meta_count.get() * sizeof(nx::sContentMetaInfo) + nx::cnmt::kDigestLen;
+	size_t minimum_size = sizeof(nn::hac::sContentMetaHeader) + data->exhdr_size.get() + data->content_count.get() * sizeof(nn::hac::sContentInfo) + data->content_meta_count.get() * sizeof(nn::hac::sContentMetaInfo) + nn::hac::cnmt::kDigestLen;
 
 	if (sample.size() < minimum_size)
 		return false;
 
-	if (data->type == nx::cnmt::METATYPE_APPLICATION)
+	if (data->type == nn::hac::cnmt::METATYPE_APPLICATION)
 	{
-		const nx::sApplicationMetaExtendedHeader* meta = (const nx::sApplicationMetaExtendedHeader*)(sample.data() + sizeof(nx::sContentMetaHeader));
+		const nn::hac::sApplicationMetaExtendedHeader* meta = (const nn::hac::sApplicationMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
 		if ((meta->patch_id.get() & data->id.get()) != data->id.get())
 			return false;
 	}
-	else if (data->type == nx::cnmt::METATYPE_PATCH)
+	else if (data->type == nn::hac::cnmt::METATYPE_PATCH)
 	{
-		const nx::sPatchMetaExtendedHeader* meta = (const nx::sPatchMetaExtendedHeader*)(sample.data() + sizeof(nx::sContentMetaHeader));
+		const nn::hac::sPatchMetaExtendedHeader* meta = (const nn::hac::sPatchMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
 		if ((meta->application_id.get() & data->id.get()) != meta->application_id.get())
 			return false;
 
 		minimum_size += meta->extended_data_size.get();
 	}
-	else if (data->type == nx::cnmt::METATYPE_ADD_ON_CONTENT)
+	else if (data->type == nn::hac::cnmt::METATYPE_ADD_ON_CONTENT)
 	{
-		const nx::sAddOnContentMetaExtendedHeader* meta = (const nx::sAddOnContentMetaExtendedHeader*)(sample.data() + sizeof(nx::sContentMetaHeader));
+		const nn::hac::sAddOnContentMetaExtendedHeader* meta = (const nn::hac::sAddOnContentMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
 		if ((meta->application_id.get() & data->id.get()) != meta->application_id.get())
 			return false;
 	}
-	else if (data->type == nx::cnmt::METATYPE_DELTA)
+	else if (data->type == nn::hac::cnmt::METATYPE_DELTA)
 	{
-		const nx::sDeltaMetaExtendedHeader* meta = (const nx::sDeltaMetaExtendedHeader*)(sample.data() + sizeof(nx::sContentMetaHeader));
+		const nn::hac::sDeltaMetaExtendedHeader* meta = (const nn::hac::sDeltaMetaExtendedHeader*)(sample.data() + sizeof(nn::hac::sContentMetaHeader));
 		if ((meta->application_id.get() & data->id.get()) != meta->application_id.get())
 			return false;
 
@@ -937,12 +937,12 @@ bool UserSettings::determineValidCnmtFromSample(const fnd::Vec<byte_t>& sample)
 
 bool UserSettings::determineValidNacpFromSample(const fnd::Vec<byte_t>& sample) const
 {
-	if (sample.size() != sizeof(nx::sApplicationControlProperty))
+	if (sample.size() != sizeof(nn::hac::sApplicationControlProperty))
 		return false;
 
-	const nx::sApplicationControlProperty* data = (const nx::sApplicationControlProperty*)sample.data();
+	const nn::hac::sApplicationControlProperty* data = (const nn::hac::sApplicationControlProperty*)sample.data();
 
-	if (data->logo_type > nx::nacp::LOGO_Nintendo)
+	if (data->logo_type > nn::hac::nacp::LOGO_Nintendo)
 		return false;
 
 	if (data->display_version[0] == 0)
@@ -1004,16 +1004,16 @@ bool UserSettings::determineValidEsTikFromSample(const fnd::Vec<byte_t>& sample)
 	return true;
 }
 
-nx::npdm::InstructionType UserSettings::getInstructionTypeFromString(const std::string & type_str)
+nn::hac::npdm::InstructionType UserSettings::getInstructionTypeFromString(const std::string & type_str)
 {
 	std::string str = type_str;
 	std::transform(str.begin(), str.end(), str.begin(), ::tolower);
 
-	nx::npdm::InstructionType type;
+	nn::hac::npdm::InstructionType type;
 	if (str == "32bit")
-		type = nx::npdm::INSTR_32BIT;
+		type = nn::hac::npdm::INSTR_32BIT;
 	else if (str == "64bit")
-		type = nx::npdm::INSTR_64BIT;
+		type = nn::hac::npdm::INSTR_64BIT;
 	else
 		throw fnd::Exception(kModuleName, "Unsupported instruction type: " + str);
 
diff --git a/programs/nstool/source/UserSettings.h b/programs/nstool/source/UserSettings.h
index fd53077..2643243 100644
--- a/programs/nstool/source/UserSettings.h
+++ b/programs/nstool/source/UserSettings.h
@@ -4,9 +4,9 @@
 #include <fnd/types.h>
 #include <fnd/Vec.h>
 #include <fnd/List.h>
-#include <pki/SignedData.h>
-#include <pki/CertificateBody.h>
-#include <nx/npdm.h>
+#include <nn/pki/SignedData.h>
+#include <nn/pki/CertificateBody.h>
+#include <nn/hac/npdm.h>
 #include "nstool.h"
 
 class UserSettings
@@ -28,7 +28,7 @@ public:
 	bool isListFs() const;
 	bool isListApi() const;
 	bool isListSymbols() const;
-	nx::npdm::InstructionType getInstType() const;
+	nn::hac::npdm::InstructionType getInstType() const;
 
 	// specialised paths
 	const sOptional<std::string>& getXciUpdatePath() const;
@@ -104,7 +104,7 @@ private:
 
 	bool mListApi;
 	bool mListSymbols;
-	nx::npdm::InstructionType mInstructionType;
+	nn::hac::npdm::InstructionType mInstructionType;
 
 	void populateCmdArgs(const std::vector<std::string>& arg_list, sCmdArgs& cmd_args);
 	void populateKeyset(sCmdArgs& args);
@@ -117,5 +117,5 @@ private:
 	bool determineValidNacpFromSample(const fnd::Vec<byte_t>& sample) const;
 	bool determineValidEsCertFromSample(const fnd::Vec<byte_t>& sample) const;
 	bool determineValidEsTikFromSample(const fnd::Vec<byte_t>& sample) const;
-	nx::npdm::InstructionType getInstructionTypeFromString(const std::string& type_str);
+	nn::hac::npdm::InstructionType getInstructionTypeFromString(const std::string& type_str);
 };
\ No newline at end of file
diff --git a/programs/nstool/source/XciProcess.cpp b/programs/nstool/source/XciProcess.cpp
index 5def29e..9408e42 100644
--- a/programs/nstool/source/XciProcess.cpp
+++ b/programs/nstool/source/XciProcess.cpp
@@ -1,5 +1,5 @@
 #include <fnd/SimpleTextOutput.h>
-#include <nx/XciUtils.h>
+#include <nn/hac/XciUtils.h>
 #include "OffsetAdjustedIFile.h"
 #include "XciProcess.h"
 
@@ -33,11 +33,11 @@ void XciProcess::process()
 	}
 	
 	// read header page
-	mFile->read((byte_t*)&mHdrPage, 0, sizeof(nx::sXciHeaderPage));
+	mFile->read((byte_t*)&mHdrPage, 0, sizeof(nn::hac::sXciHeaderPage));
 
 	// allocate memory for and decrypt sXciHeader
-	scratch.alloc(sizeof(nx::sXciHeader));
-	nx::XciUtils::decryptXciHeader((const byte_t*)&mHdrPage.header, scratch.data(), mKeyset->xci.header_key.key);
+	scratch.alloc(sizeof(nn::hac::sXciHeader));
+	nn::hac::XciUtils::decryptXciHeader((const byte_t*)&mHdrPage.header, scratch.data(), mKeyset->xci.header_key.key);
 
 	// validate header signature
 	if (mVerify)
@@ -130,22 +130,22 @@ void XciProcess::displayHeader()
 	{
 		printf("  RomAreaStartPage:       0x%0x", mHdr.getRomAreaStartPage());
 		if (mHdr.getRomAreaStartPage() != (uint32_t)(-1))
-			printf(" (0x%" PRIx64 ")", nx::XciUtils::blockToAddr(mHdr.getRomAreaStartPage()));
+			printf(" (0x%" PRIx64 ")", nn::hac::XciUtils::blockToAddr(mHdr.getRomAreaStartPage()));
 		printf("\n");
 
 		printf("  BackupAreaStartPage:    0x%0x", mHdr.getBackupAreaStartPage());
 		if (mHdr.getBackupAreaStartPage() != (uint32_t)(-1))
-			printf(" (0x%" PRIx64 ")", nx::XciUtils::blockToAddr(mHdr.getBackupAreaStartPage()));
+			printf(" (0x%" PRIx64 ")", nn::hac::XciUtils::blockToAddr(mHdr.getBackupAreaStartPage()));
 		printf("\n");
 
 		printf("  ValidDataEndPage:       0x%x", mHdr.getValidDataEndPage());
 		if (mHdr.getValidDataEndPage() != (uint32_t)(-1))
-			printf(" (0x%" PRIx64 ")", nx::XciUtils::blockToAddr(mHdr.getValidDataEndPage()));
+			printf(" (0x%" PRIx64 ")", nn::hac::XciUtils::blockToAddr(mHdr.getValidDataEndPage()));
 		printf("\n");
 
 		printf("  LimArea:                0x%x", mHdr.getLimAreaPage());
 		if (mHdr.getLimAreaPage() != (uint32_t)(-1))
-			printf(" (0x%" PRIx64 ")", nx::XciUtils::blockToAddr(mHdr.getLimAreaPage()));
+			printf(" (0x%" PRIx64 ")", nn::hac::XciUtils::blockToAddr(mHdr.getLimAreaPage()));
 		printf("\n");
 
 		printf("  PartitionFs Header:\n");
@@ -193,7 +193,7 @@ bool XciProcess::validateRegionOfFile(size_t offset, size_t len, const byte_t* t
 void XciProcess::validateXciSignature()
 {
 	crypto::sha::sSha256Hash calc_hash;
-	crypto::sha::Sha256((byte_t*)&mHdrPage.header, sizeof(nx::sXciHeader), calc_hash.bytes);
+	crypto::sha::Sha256((byte_t*)&mHdrPage.header, sizeof(nn::hac::sXciHeader), calc_hash.bytes);
 	if (crypto::rsa::pkcs::rsaVerify(mKeyset->xci.header_sign_key, crypto::sha::HASH_SHA256, calc_hash.bytes, mHdrPage.signature) != 0)
 	{
 		printf("[WARNING] XCI Header Signature: FAIL \n");
@@ -216,7 +216,7 @@ void XciProcess::processRootPfs()
 
 void XciProcess::processPartitionPfs()
 {
-	const fnd::List<nx::PfsHeader::sFile>& rootPartitions = mRootPfs.getPfsHeader().getFileList();
+	const fnd::List<nn::hac::PfsHeader::sFile>& rootPartitions = mRootPfs.getPfsHeader().getFileList();
 	for (size_t i = 0; i < rootPartitions.size(); i++)
 	{
 		// this must be validated here because only the size of the root partiton header is known at verification time
@@ -243,22 +243,22 @@ const char* XciProcess::getRomSizeStr(byte_t rom_size) const
 	const char* str = "unknown";
 	switch (rom_size)
 	{
-		case (nx::xci::ROM_SIZE_1GB):
+		case (nn::hac::xci::ROM_SIZE_1GB):
 			str = "1GB";
 			break;
-		case (nx::xci::ROM_SIZE_2GB):
+		case (nn::hac::xci::ROM_SIZE_2GB):
 			str = "2GB";
 			break;
-		case (nx::xci::ROM_SIZE_4GB):
+		case (nn::hac::xci::ROM_SIZE_4GB):
 			str = "4GB";
 			break;
-		case (nx::xci::ROM_SIZE_8GB):
+		case (nn::hac::xci::ROM_SIZE_8GB):
 			str = "8GB";
 			break;
-		case (nx::xci::ROM_SIZE_16GB):
+		case (nn::hac::xci::ROM_SIZE_16GB):
 			str = "16GB";
 			break;
-		case (nx::xci::ROM_SIZE_32GB):
+		case (nn::hac::xci::ROM_SIZE_32GB):
 			str = "32GB";
 			break;
 	}
@@ -270,13 +270,13 @@ const char* XciProcess::getHeaderFlagStr(byte_t flag) const
 	const char* str = "unknown";
 	switch (flag)
 	{
-		case (nx::xci::FLAG_AUTOBOOT):
+		case (nn::hac::xci::FLAG_AUTOBOOT):
 			str = "AutoBoot";
 			break;
-		case (nx::xci::FLAG_HISTORY_ERASE):
+		case (nn::hac::xci::FLAG_HISTORY_ERASE):
 			str = "HistoryErase";
 			break;
-		case (nx::xci::FLAG_REPAIR_TOOL):
+		case (nn::hac::xci::FLAG_REPAIR_TOOL):
 			str = "RepairTool";
 			break;
 	}
@@ -289,10 +289,10 @@ const char* XciProcess::getCardClockRate(uint32_t acc_ctrl_1) const
 	const char* str = "unknown";
 	switch (acc_ctrl_1)
 	{
-		case (nx::xci::CLOCK_RATE_25):
+		case (nn::hac::xci::CLOCK_RATE_25):
 			str = "20 MHz";
 			break;
-		case (nx::xci::CLOCK_RATE_50):
+		case (nn::hac::xci::CLOCK_RATE_50):
 			str = "50 MHz";
 			break;
 
diff --git a/programs/nstool/source/XciProcess.h b/programs/nstool/source/XciProcess.h
index 68d8f54..32fc038 100644
--- a/programs/nstool/source/XciProcess.h
+++ b/programs/nstool/source/XciProcess.h
@@ -3,7 +3,7 @@
 #include <fnd/types.h>
 #include <fnd/IFile.h>
 #include <fnd/List.h>
-#include <nx/XciHeader.h>
+#include <nn/hac/XciHeader.h>
 
 #include "nstool.h"
 
@@ -57,8 +57,8 @@ private:
 
 	bool mListFs;
 
-	nx::sXciHeaderPage mHdrPage;
-	nx::XciHeader mHdr;
+	nn::hac::sXciHeaderPage mHdrPage;
+	nn::hac::XciHeader mHdr;
 	PfsProcess mRootPfs;
 	fnd::List<sExtractInfo> mExtractInfo;
 
diff --git a/programs/nstool/source/main.cpp b/programs/nstool/source/main.cpp
index 7eefe54..6a30e29 100644
--- a/programs/nstool/source/main.cpp
+++ b/programs/nstool/source/main.cpp
@@ -46,13 +46,13 @@ int main(int argc, char** argv)
 			xci.setVerifyMode(user_set.isVerifyFile());
 
 			if (user_set.getXciUpdatePath().isSet)
-				xci.setPartitionForExtract(nx::xci::kUpdatePartitionStr, user_set.getXciUpdatePath().var);
+				xci.setPartitionForExtract(nn::hac::xci::kUpdatePartitionStr, user_set.getXciUpdatePath().var);
 			if (user_set.getXciLogoPath().isSet)
-				xci.setPartitionForExtract(nx::xci::kLogoPartitionStr, user_set.getXciLogoPath().var);
+				xci.setPartitionForExtract(nn::hac::xci::kLogoPartitionStr, user_set.getXciLogoPath().var);
 			if (user_set.getXciNormalPath().isSet)
-				xci.setPartitionForExtract(nx::xci::kNormalPartitionStr, user_set.getXciNormalPath().var);
+				xci.setPartitionForExtract(nn::hac::xci::kNormalPartitionStr, user_set.getXciNormalPath().var);
 			if (user_set.getXciSecurePath().isSet)
-				xci.setPartitionForExtract(nx::xci::kSecurePartitionStr, user_set.getXciSecurePath().var);
+				xci.setPartitionForExtract(nn::hac::xci::kSecurePartitionStr, user_set.getXciSecurePath().var);
 			xci.setListFs(user_set.isListFs());
 
 			xci.process();
diff --git a/programs/nstool/source/nstool.h b/programs/nstool/source/nstool.h
index a52c571..3e2043e 100644
--- a/programs/nstool/source/nstool.h
+++ b/programs/nstool/source/nstool.h
@@ -4,10 +4,10 @@
 #include <fnd/types.h>
 #include <crypto/aes.h>
 #include <crypto/rsa.h>
-#include <nx/nca.h>
+#include <nn/hac/nca.h>
 
 static const size_t kMasterKeyNum = 0x20;
-static const size_t kNcaKeakNum = nx::nca::kKeyAreaEncryptionKeyNum;
+static const size_t kNcaKeakNum = nn::hac::nca::kKeyAreaEncryptionKeyNum;
 
 enum IFileOwnershipMode
 {