Clean up demo script and fix refactor errors in FAile