refactor and delete bin files