Added const to getNumFreeResources and gitignore