Adding GUI handler for Neural Networks.

Also some minor fixes in other places.