Initial Commit

Code from original "binary distance search" project.