#29 add function for server request, optimalize server requests, remove unused variables.