Added more test codes to TestLogic. Debugged other codes on the way