Add more tests and make solaris pass