Merge pull request #401 from AZaitzeff/optim

Changed ipython files to normal python files
Added a simple example, then I got rid of everything with integers