Detab and fix tests