Fixing several retain cycles
fixes #35