Moved things around, fixed some warnings, and brought in the UI libraries (was libAPLUI).
Added compat.h to handle compilation on x86 for logic testing.