Fixed a few types and removed unnecessary library calls.