there were a lot of lines that needed static_casts to get rid of compiler errors (c++11 issues) so I added them. Replaced #include<lib.h>s with #include<clib>s, and moved them below the local includes
[[Split portion of a mixed commit.]]