Fixes from TD's review