Cleaned up warnings, added test for them.