molecule middleware registration process optimized

Signed-off-by: Alexander Knapstein <alexander.knapstein@inspirationlabs.com>