Allow function statements everywhere

Cleanup parsing of blocks