Refactor size_x -> xsize, size_y -> ysize