Fixed silly mistake I caused earlier, added consts to variables and rearranged