refactor : do dependency injection properly

improve DI to avoid minification issues

Signed-off-by: Justin Noel <github@calendee.com>