add todos, util js and change evaluation logic to do extending first