Cleaned up warnings and removed unused libraries.