further improvements to rugby.py

- detect and try to remove character(s) after template

- sort params by name