move Page and writeCounter to shell.go