rearrange some code for template default variables
complete navigation, add tests for arrayvalue trait