CHanged the whole thing to an Angularjs application