Refactor quadromper to use less resources.