Library internals moved into details namespace

closes #13