Fixed some warnings
Added more typedefs for triangle