validate image, refactor html to haml, ui updates