Initial import of the core portable library