Adds browser example and refactors.