Added new files, modified server and client codes and moved templates code to templates directory.

I think this folder structure is better.