Remove foundry dependency, add tests