backend refactor working, piano and refresh mode to be tested