Optimized for 16:9, that wasn't so hard, but, my code is still piece of sh##