Code formatting and fixing a bug or two