tidy up
add helpers wrapper
add ability to match the window object protocol
merge changes from master