refactor modules for performance

This was a good one ! /cc @techhat @regilero @thatch45 @toutpt @regilero

PaaS engine nealy finished !