Make logging level configurable
Added clone functionality.