Bug fixes. Move square to its own file.