Cleaned up character math a little.