more small changes and cleanup