Moved web code to one file in order to simplify server code