Fixed indent style and performance improvement #189

Reflects the comment of the review of PR #189