small fix
Merge pull request #126 from ccd0/master

consolidate duplicated code
remove inline javascript, add clear button for file field