Ugly server for refactoring