First version. Uploading Ben's code.