Cleanup/refactoring