Make weight limit backend functionality more generic