Add some debug information and changed buttons management
Remove ~ files