pep8ified and converted to use py.test, but still fails.
removing spice stuff for now, putting it into branch