Auto tab closing, fix order of loading using recursion instead of locks, improved logging