Cleanup middleware and project model