Design changes

Fixes some bugs