add vars directory, begin middleware stuff