Fixed everything

Everything builds now and libraries are working for the most part.