Refactored CGI code, added DELETE test