Seperated math functions from app.js into math.js module, added some more vector math functions