So after a short revision of the existing code i added two new functions just for fun.
You can find them here:
https://gist.github.com/Stefan-Xp/e0cd595200d31ee6518c (Forked from DaveDarko)
I would love to get some feedback ;)
Next: Create some nice animations :D With a 3x3x3 Cube how many different "frames" could be created before repeating? ;)