Fixed a number of bugs and typos and have now gotten the programme working.
Ignoring pyc files