1. Refactored front end variables and protocol nomenclature.
2. Added activity submitting handler on server side.