Added ability to have per page CSRF tokens. Code clean up