Code formatting

Completed #904