update code structure
work with some cookie
seperate ajax code
some managements