Fixed returned value for gradient

It is now a list (value, gradient)
Added some type information.
Function max is deprecated in Julia 0.2
Added example notebook.