code review in progress
refactor
use strict
add assert
remove methods from proto and refactor to helpers file