12/3 changes

added main class for testing, fixed some bugs, etc.