Add option to allow return outside of functions.

Close #288