fix off by one bug. top_grid was never initialized or checked
add fakemain to simplify debug of ui components only