Add tests and update files