clean up more; refactoring; fix