Lots of bug fixes.
Now supports any resolution