Update code formatting and documentation