Move common classes to outside.