Fixing scaling. Still uses some random numbers that I don;t know where they come from.