Fix warnings

This fixes various warnings. This also uncovered a minor typo bug in AE.cc. Also, a few files were converted from windows to unix line endings.