move to endf namespace and add tests