Some cleanup/fixes