Moved solution to top level.