Changed to portable ints
Added base for Triangle