Add inject methods instead of constructor injection + add shutdown hanlder

Refactor to fit PSR-2 standard