Main code

Can make English comments if asked to.