refactored backend + frontend code in same folder