Code formatting and additional documentation