Reworked strem decoder logic a bit to make it work and reworked handler registrator to return new references to objects