Big re-vamp of the target library
(core) Fix some compiler warnings