some modules added (code moved), fixes made