Changed typeids into enums instead. Added helper interface