updated/fixed issues with initialisation & clean-up/close