NN Framework revise

less switch statements in the compute. this simply pushes the issue of
getting the correct function number to the grammar, however since the
grammar runs only once and the NN in each iteration, this makes sense