Reimplemented everything in python
Fixes bug in csv parsing
Refactoring