Remove unused LOG code, minor updates to ease porting