Huge amounts of cleanup and warning fixes along with base x86_64 support