Updated value scaling and fixed x and y centing