Added type signatures to everything.