Added scratch versions of algorithm implementations.