Changed to low res, some code refactoring