Factor out the public directory