Replaced old local storage function by using separate JS file.