fixes some problems, uses tanh as activation function
Merge branch 'fixes'