added prefix, nested remove, better constructor