immutable approach to module initialization

- make modules stateless, extract class for initialized modules
- fix module forward lookup
- add forward lookup test