Add a bunch of type annotations

Hello @x-ma, 

Please review the following commits I made in branch 'nick-compiler'.

c44191cc6b683413262a383e15ab6722319669c5 (2014-03-26 16:06:06 -0400)
Add a bunch of type annotations

R=@x-ma