Squashed commit of the following:

commit b464d7f815a873083f6041504e7cb0130c927031
Author: Qiming Sun <osirpt.sun@gmail.com>
Date:   Sat Apr 12 15:40:36 2014 -0400

    add simple test for wavefunction

commit ca28fa5e207095dc83ec73783f49aa2028bcb77d
Author: Qiming Sun <osirpt.sun@gmail.com>
Date:   Sat Apr 12 15:18:23 2014 -0400

    fix few bugs

commit 26920065d8c26f9f51ee8808df440b94301a3bef
Author: Qiming Sun <osirpt.sun@gmail.com>
Date:   Sat Apr 12 14:44:32 2014 -0400

    add high level wrapper. before test