add module.js
remove unused writeLogic
If/ElseIf now tolerate operations