changed maximum scale factor
some cleanup