Make the amount of required resources configurable, fix indentation