Cleaned up python bindings interface a bit; now returns strings rather than character codes if appropriate