Removed warnings + code cleanup