Code for a simple browser in swift