fixing dom ready issues and refactoring forcetotop method into service