Add logging. Reorganize repo structure