refactoring + bug fixes

new image upload + css and js in different files