minor updates mostly refactor and clean up