Cleaned up some redundant code. Now fully generates sql queries based off of yaml config file