Code re-write

Using variables within functions to navigate code