JavaScript SPA excercise