cleanup and simplification
final cleanup