chore(Build): fix build issue and code cleanup