fixed many bugs, seems fairly fast and robust now. will merge updates from master