scratch: fix x position, code layout