Move backend code from Resources folder