Removes useless code
Better way to check if running in CLI mode
Adds support of pre/post in routes
Adds support of pre/post in routes