Fixed a memory leak, added all expression return types.

Also fixed compilation under gcc/clang.