Fixed the Max restriction type, and only setting restrictions where not implied already by Integer.MAX and MIN.