Fixed Warnings and removed unused imports.