improve stability
remove duplicated code
add compile marco
Merge branch 'master' into crack_pro

Conflicts:
	controlpanel.cpp