First working implementation
Refactored most of the things... work faster
More logging