Castle Interception Implementation and Performance Improvements

As mentioned on my email. the refactoring that I did to implement Castle. Can go through the details of it if you want.