added search for freecad lib variable
Fix some comments as modded upstream
Fix missing theme directive.