New warnings + minor code cleanup