refactored into product.c and ui.c
cleanup