added doc blocks, comments, language strings and some file upload checks