replaces tabs with spaces, minor code style updates