Cleanup ja refactor.