Code cleanup & Warnings fix