refactored main.js, added function getCheckedValues, clearData