Create API and IMPL modules

I want to be able to deploy into an OSGI runtime, so
as a first start I have split it into API and IMPL
modules.