Finished intercept code and cleaned up