Fixed several bugs; Added test case of interface.py