cleaned dead code
renamed i and j to y and x, respectively. It just makes more sense