Fixed code blocks in the implementation section.