Initial working version with basic type support