improved redirection logic and added appearance page
templating engine done