cleaned up the edges, should catch a few more errors and spit them out to the console