Add test server and config template
Fix some bugs found via test server