split classes in a cleaner way