Bug fix in pages (LEFT JOIN instead of JOIN)
Move JavaScript to seperate files