Add some comments and ifdef fix