Fixed Broken Things as well as cleaned up the code