Remove trailing spaces
Small fix
Add isValid()