Use resources for main formula download

This was one of the ideas you liked. It passes all the existing tests, but there are not many tests for resources yet.