adjusted to new sting constants, fixed some minor issues.