Clened up code more