Update source code formatting

Fix #353.
Fix #446.
Fix #484.
Close #430.