Update Core related classes

Remove some unneccessary codes;
Add preRequest method to perform some operations before sending
requests;
Simplize get/post methods;
Add a exitFlag and a randomizer