Restructured functions and module init process
Added population pools for module components
Added encounters