Fix warnings.
Update license
Use pattern matching for route validity.