Main Refac