Added some post integration features and refactored a little