Edited templates location, removed unnecessary CSS and JS files, moved the onePageApp style and scripts into respective files, modified variable names for better comprehension.
TODO next: add comments to the code.
Added templating to the one page app, added and configured sessions to remember the last position and stored sessions for one day, even after browser close.