Refactored code in views. Worked on available information in contest.

Also refactored some xhpy, some contest front-end logic and some urls.