Added define guard for ln10. Fixed warnings. Removed trailing whitespaces and tabs.