Refactored code..still way more to go