Verified to be mostly working