Support py3

- remove long
- fix decode method for bytes
- use list(map(...)) instead of map