Browser life-cycles implemented.

Fixed #13