Modified structure following Lazyfoo's tutorial