Fix for needed to click links 2x
Clean-up and refactoring