Code Cleanup, Addition of extra hooks, Improved Settings API

Code Cleanup
Addition of extra hooks
Minor Issues Resolved
Improved Settings API