Add files directive.
Get rid of global state.
Remove more global state.