refactoring some codes, add tutorial pages