Fixed inheritence of routeTransforms

Inheritence of options is fine for simple types, but routeTransforms should be converted to an array and executed sequentially.

Additionally we have to take care to deep copy this array, rather than reusing it (as extend would do) because it would get added to the parent.

Also tidied up some linting problems.