Tweaks to aid compilation for typing