Made some fixes, updated some tests