Revert "Remove structs and start to extract common abstract base class"

This reverts commit 8cdadc2557868acabdd1e3566c195f8b52120d47.
Fix test for the struct types after last revert