Add J Unit tests and update code