new design + refactoring

Signed-off-by: thyb <thyb@oauth.io>