rewritten part of mater module. minor changes in type and memory.
Merge branch 'master' of https://github.com/jjakubowski/ESL_project.git