Changed things
Added logging
More changes
Fixes
Added more logs