Changes to  work.
Added log and other stuff.