fixed bug + slider now always gives value between 1 and 0
solved a bug where the js was executed before layout of the page was finished
slider will now always put out a value between 1 and 0. Converting this to a meaningful number is delegated to the event listener
Last part of functionality before major refactoring