First commit

Code is almost working. Need to debug and add some more. See if you can
modify it to make it work or something.