Added encrypted credentials for testing and way too many functions!