update adapt resolution algorithm
refactor some if-statements
delete unused WindowOptim.java