added support for 'main' function, which runs after filescope functions