Implemented custom auxiliary fields and added some tests.