small fixes. cleaned up project. modified test code.