add settings.height und settings.width

add settings.height und settings.width parameter to override predefined settings + autoformat and fix some code so jshint doesn't complain