further cleanup and created a minimal example