Added dynamic panel resizing. resolves #16