Externs support, a few lib updates and some tiny fixes