Fixed bugs, Reduced Code