Done everything up to conditions

Need to make the conditions to work. Right now it provide the
functionality to set the conditions but they have no effect on
front-end. So far, the conditions are loaded via ajax successfully.