forgot to commit new main table routine
Cleaned up code, staring point for group meeting Feb 17 2013