Added backend file. Possible enhancements are in comments. Yet to be incorporated to UI.