Category theoretic foundations