Use define to know state and adjust entry points for more security