[WIP] Refactoring and Updating Code