Moved everyting in a module, starting to add unit tests.
Merged some parts of sbuss/pypercube thanks to @sbuss.
Updated README and LICENSE