Harmonize fold-in with speed layer and collapse/refactor some usage of fold-in, marginally increasing accuracy/performance in some cases. Remove unused test code.