more
lots of refactoring to prevent leaks
more
more