Code style update

Tabs to spaces and function name fixes.