Split files into server client model. Removed dead unused scripts