Added submission datatype
Refactored API and Tests