add security and best practice helpers and small refactored. move insecure details in ENV