$this->layout()->output() instead of $content

Please consider not using hardcoded vars e.g $content.

A much cleaner solution would be something like $this->layout()->output();

Using as hardcoded var name could be a security issue e.g

Let's say that someone have register_global_vars on, then $content could be set through the URL

IMHO, hardcoded vars and global vars is 'bad' practice - I know that it improves performance but it can compromise security

These are just local variables which won't conflict with global variables, even if you turn on register_global_vars. Also, $content is the only local variable used in layout only. So it won't conflict with your own variables, either.