refactor cutm layout
refactor code according the latest module
add mysql support for new module