Made corrections based on Martins comments