refactor of FFX into distinct directory