Completed refactoring
Added logger
Fixed graphs