Nice post to read when in a similar situation! I recommend for further math related reading and for further code related reading