Some more type stuff and class instance fix