Refactor

For  the online version.