Better route handling (closes #6).