Implementing Neural Networks in Javascript