Refactor Main.java

--disable-memo does not require extra argument.
run interactive shell if ShellMode is enabled.