separated backend and frontend config; also moved frontents javascript to separate file; divide and conquer