diff --git a/Cargo.lock b/Cargo.lock
index 09076b8..e39a45a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -85,6 +85,7 @@ name = "ngen"
version = "0.1.0"
dependencies = [
"clap",
+ "serde",
"toml",
]
diff --git a/Cargo.toml b/Cargo.toml
index 482c5ea..b10886e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -7,4 +7,5 @@ edition = "2021"
[dependencies]
clap = { version = "4.5.1", features = ["derive", "std", "help", "usage"], default-features = false }
+serde = { version = "1.0.197", features = ["derive"] }
toml = "0.8.10"
diff --git a/src/config_file_parsing.rs b/src/config_file_parsing.rs
deleted file mode 100644
index ca4cb24..0000000
--- a/src/config_file_parsing.rs
+++ /dev/null
@@ -1,106 +0,0 @@
-use std::fmt::Display;
-
-use toml::{Table, Value};
-
-#[derive(Debug)]
-pub struct ConfigFileError<'a> {
- pub key_path: String,
- pub message: &'a str,
-}
-
-impl Display for ConfigFileError<'_> {
- fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
- write!(
- f,
- "config file error: key {}: {}.",
- self.key_path, self.message
- )
- }
-}
-
-pub fn get_key_as_str<'a>(
- table: &'a Table,
- key: &str,
- key_path: String,
-) -> Result