Separated types into complex and primitive and implement ops