javascript in separate files and show favorites button added and favorites bug fixed