introduce separation of modules on package layer and rewrite memorytap for testing usage only in scala