Update ANN

Improved implementation of anntrain