Basically wrote the whole program in one go

Some things may be broken