Extract class definitions into separate file.