Clean up + refactoring