More refactoring
Fixed minor compiler warnings
Further refactoring and laying groundwork for fixing numerous type size issues by converting to uint*_t
Better specified types for structures (still potentially packing issues)
Refactoring, and updated Makefile; 64bit build now appears to work