Add comments and fix indentation