cleanup and simplify
minor fixes