#53 work ongoing, some memleaks left