Cleaning

clean some warning and bugs