Add method key and file classmethods.