extension support, various additions and fixes