Move some functions to module
---//---
All functions moved to module