more clean up and code semi-separation (frontend/backend)