A lot of changes

Design changes, test changes, bug fixes