Added stuff suggested by Miguel