Add some logs

Add some logs, and cleanup unused code