Add comments and make min/max constants