Goals backend - core functionality done(bugs fixed)