refactor developer materials. Fixes DEVELOPER-989

Most of this is moving code around to their own functions, introduced the option to update the page hash or not. 
Can you try to do white-space changes (i.e. code-reformatting) in separate commits. It makes it hard to find the changes when reviewing the actual code changes.