Added return statement parse support and fixed index tracking on function parsing.