General Refactoring and Removed Warnings