use substitute instead of substituteVariable

Update to substitute method which also includes devices.
Bump ServerApiVersion
Fix tab/soft tab inconsistencies
Remove trailing whitespace

Closes #1