Fix Notices and formatting