More scala. Also renamed INailedBlock to ReplacedBlock and moved it out of the api