Optional upload parameters added, some comments and additional test