fix module name, move constants and errors