Refactored the entire project