seperate JavaScript code into data and UI oriented files, added TODO's