Code reviewed and removed warnings