cleaning up code
removed unused code
adding simple logging code