Cleanup/refactor