added resolution scaling and minor stuff