Added all the code. Also a bit of readme.