Cleanup

This is not complete as I still don't have a gateway or a resolver.