Option to switch to Sandbox + some minor changes

Following changes were made:
1. The Administrator is given an option to change to sandbox server
2. Changed the privacy of variables to protected and made some further
minor changes to the variable names and constants.