Fixed bug with calculating, added demo scripts, fixed gitignore