MagicByte unit test
light refactoring
operations refactored to own package