Fixed types and elaborated some things.