Fixing anonymous modules bug and unit tests