Remove unused functions
Clear thread when freeing resource if not done
Report the actual freed size
Change logging messages
Remove unnecessary logging messages
Handle cleanup of worker threads different

Should avoid deadlocks
Increase cache size for starting better

It will now be able to load the starting position without going over the
limit.