Refactored website selector code to make it less sucky