use constants properly and extract ssl url into separate class