Fix 1

Fixed some Bugs, Made the code Clearer