Enabled -Weverything and cleaned up the code.