cleaned up python wrapper and added a test file