fixed more then 500 Warnings and remove unused code