Adding previous search feature

We have added an new button called "previous". When this button is
pressed it will list all the previous locations that user has searched.
This way the user do not need to search same location each time. We have
also done code refactoring.