CS and refactor

- Parameterized invalid attributes list
- Moved object params to subarray to prevent double-passing of template vars without checks
- CS cleanup