Trying to change frame so that it contains AffineTransform instead
Right now the code should work but it's quite awkward. There is a lot of
adjustments that need to be done