refactored server tests
fixed tests/init code
functional tests