change project structure - move stuff into SafeJS module