Small cleanups and additional tests