Refactor and debug
Delete useless file