added type checking and cleaned a little bit for submission script
Merge pull request #1 from Moriartyb/master

added type checking and cleaned a little bit for submission script