XAlgorithm

- PEP8 and PEP257
- Bug fixing