Rewrite (proxy now works, but some debug-stuff)