Better numeric base handling. Fix typos in error messages.