Add SSL in production
Refactor code