Fixed a few errors and built on Pi.