Fixed x step with unit algo and many small code clean ups. Also restored paint brush thickness toolbar