Added an exception class and moved the keys to an environment variable