pretty big refactor
new rest proxy to fit silex - minor tweaks to system