Upated functional test for precision
Added basic unit tests