Refactoring to be more readable. Messages now clearer.