Rewriting server-side function tests
Rename for consistency
PEP8 fixes
Unit tests for server-side functions