Use empty for clarity
Create matches function
Use end_with instead of regexp