Hanoi real : Stage made dependent on width/height. Moved some code to JS functions