Improved handling of elements in init(), main.js now without jQuery